| closedEnlist Plugin |
| Started by MBosta on 03-06-2007, 05:04 PM |
Threads: 30
Joined: Sep 2006
I was wondering if it'd be possible to make or find a plugin that when a player says /enlist a window (similar to the MOTD window) will come up with information about your unit/clan. Like they'd type /enlist and a window with your website, ventrilo etc. would be on there. Just wondering if that could be made. Thanks.
Threads: 37
Joined: Mar 2007
this is what u can do and also search :) rnrnhttps://www.dodplugins.net/forums/showthread.php?t=661rnrnnow thats basically the /motd and you'd still edit the motd file but instead players would say /enlist instead of /motdrnrn#include <amxmodx>rn#include <amxmisc>rnrnpublic admin_motd(id,level,cid) {rnrn if (!cmd_access(id,level,cid,1))rn return PLUGIN_CONTINUErn rn show_motd(id,"motd.txt","Clan Information")rn return PLUGIN_CONTINUE rn}rnrnpublic plugin_init() {rnrn register_plugin("say /enlist","1.1","Pa1n")rn register_clcmd("say /enlist","admin_motd",0,"- Shows the MOTD.")rn}rnrndunno if this would work but someone correct me if you know it wont i just dont have time to test im in college. Also im not trying to copy no coder just a little edit...if its wrong to post something like this please tell me
Threads: 54
Joined: May 2005
this is what u can do and also search :) n nhttps://www.dodplugins.net/forums/showthread.php?t=661n nnow thats basically the /motd and you'd still edit the motd file but instead players would say /enlist instead of /motdn n#include <amxmodx>n#include <amxmisc>n npublic admin_motd(id,level,cid) {n n if (!cmd_access(id,level,cid,1))n return PLUGIN_CONTINUEn n show_motd(id,"motd.txt","Clan Information")n return PLUGIN_CONTINUE n}n npublic plugin_init() {n nregister_plugin("say /enlist","1.1","Pa1n")nregister_clcmd("say /enlist","admin_motd",0,"- Shows the MOTD.")n}n ndunno if this would work but someone correct me if you know it wont i just dont have time to test im in college. Also im not trying to copy no coder just a little edit...if its wrong to post something like this please tell men nat a quick glance.. that is exactly how you simply alter existing code to achieve exactly what you wanted... my only suggestion is to alter...n n
show_motd(id,"[COLOR=red]motd.txt[/COLOR]","Clan Information")nthe motd.txt to a custom named file that DOES exist and contains enlistment information... motd.txt is the main motd that is displayed upon entering a server...Threads: 37
Joined: Mar 2007
yea good point
Threads: 30
Joined: Sep 2006
ok, i also tried adding the shellschock and paratrooper plugins on our Recruiting Server, this is what i did. (Tell me if i messed up somewhere)rnrnDownloaded the .smarnCompiled it to .amxxrnPut the .sma to the scripting folder, and the .amxx to the plugins folderrnEdited the plugins.ini and added the two pluginsrnRestarted Server and Changed the map, yet it still says bad load. I am suspecting that the AMXX version is old, how would i fix this?
Threads: 30
Joined: Sep 2006
i edite the .sma file, and re-compile it and it didn't work. The plugin still works for the motd, not the enlist. Here is the code i usedrnrn
rn#include <amxmodx>rn#include <amxmisc>rnrnpublic admin_motd(id,level,cid) {rnrnif (!cmd_access(id,level,cid,1))rnreturn PLUGIN_CONTINUErnrnshow_motd(id,"enlist.txt","Clan Information")rnreturn PLUGIN_CONTINUErn}rnrnpublic plugin_init() {rnrnregister_plugin("say /enlist","1.1","Pa1n")rnregister_clcmd("say /enlist","admin_motd",0,"- Shows the MOTD.")rn
Threads: 54
Joined: May 2005
i edite the .sma file, and re-compile it and it didn't work. The plugin still works for the motd, not the enlist. Here is the code i usedn nwell... once you compile an sma file you only need to keep the sma if you want the source code.. you do not need to upload an sma file to the game server.. just the .amxx (compiled) file... n nnow, for the second "issue" do you have an enlist.txt in the root folder of the game server ?? n none further suggestion....n nalter admin_motd as follows...n n
npublic admin_motd(id) n{nshow_motd(id,"enlist.txt","Clan Information")nreturn PLUGIN_CONTINUEn}nn nyou do not need the admin level checking routine because here...n n nregister_clcmd("say /enlist","admin_motd",[COLOR=yellow]0[/COLOR],"- Shows the MOTD.") nn nyou used 0 which means this option is avaliable to all players on the server... checking if they have access is redundant....n n nok here is a completed code with a flie checking bit of code to let you know if you do not have the enlist.txt file in the right place...n nn#include <amxmodx>n#include <amxmisc>n n#define MOTD_PAGE "enlist.txt"n#define MOTD_TITLE "Clan Information"npublic plugin_init() n{n register_plugin("Enlistment Info","1.1","Pa1n")n register_clcmd("say /enlist","admin_motd",0,"- Shows the MOTD.")n}npublic admin_motd(id) n{n if(file_exists(MOTD_PAGE))n {n show_motd(id,MOTD_PAGE,MOTD_TITLE)n }n elsen {n client_print(id, print_center, "Sorry but the file: %s was not located in the dod folder", MOTD_PAGE)n }n return PLUGIN_CONTINUE n}n nI JUST tested the above code and it in fact works fine.. and I do not think any older version will hinder the use of this plugin as all the codes used are very original ...Threads: 30
Joined: Sep 2006
ok, i opened up the say_motd plugin, inserted the code above, and over wrote the file. I tried to compile it, but the compiler just doesn't do anything. It works fine because i just converted the amx_patachute plugin right before it. Could you post a link to the .sma you used, since it worked beautifully.
Threads: 30
Joined: Sep 2006
ok, i fixed the problem above. I placed the enlist.txt in my dod folder yet it says Sorry the file enlist.txt was not located in your did folder. (By the way, i'm testing this on my dedicated server before i upload to the recruiting server, just wondering if thats the problem?
Threads: 30
Joined: Sep 2006
Wow sorry to be a pain in the ass, but upon my stupidity i named the file enlist.txt.txt, i called enlist.txt and then it added the extension lol. ok Thanks alot man, works beautifully, and really appreciate the help.
Threads: 54
Joined: May 2005
:D glad it worked out for ya...

