Raised This Month: $ Target: $400
 0% 

problem with halting the plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Revelation
Junior Member
Join Date: Jan 2005
Old 01-13-2005 , 14:30   problem with halting the plugin
Reply With Quote #1

my plugin is slightly large, show I will only show the bits that are relevant:
Code:
/* VARIABLES */ new PLUGIN[]="Peep Show Server Settings" new AUTHOR[]="Revelation" new VERSION[]="1" new sCmd[64] /* server_cmd("?") */ new sLive[64]="exec cfgs/live.cfg" new sKnives[64]="exec cfgs/knives.cfg" new sPublic[64]="exec cfgs/public.cfg" new sWar[64]="exec cfgs/war.cfg" new sRR[64]="sv_restartround 1" /* REGISTER PLUGIN AND COMMANDS */ public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd("say /live","cmd_live",ADMIN_KICK,"execute the servers live.cfg")     register_concmd("say /knives","cmd_knives",ADMIN_KICK,"execute the servers knives.cfg")     register_concmd("say /public","cmd_public",ADMIN_KICK,"execute the servers public.cfg")     register_concmd("say /war","cmd_war",ADMIN_KICK,"execute the servers war.cfg")     register_concmd("say /rr","cmd_rr",ADMIN_KICK,"server command: sv_restartround 1") } /* AMX NO ACCESS */ public cmd_noaccess(id) {     client_print(id, print_chat, "You do not have acces to this command.")     return PLUGIN_HANDLED } /* RUN COMMAND ON SERVER */ public cmd_run() {     server_cmd(sCmd)     server_exec()     return PLUGIN_HANDLED } /* EXEC LIVE.CFG */ public cmd_live(id, level, cid) {     if (!cmd_access(id, level, cid, 0)) {         cmd_noaccess(id)     }     copy(sCmd,64,sLive)     cmd_run() }
Everything works fine, when an admin runs the command "say /live" the server does 3rr etc etc but the problem is when a non admin runs my command. When someone who isnt a non admin trys "say /live" it first displays "you do not have access to this command" but then it goes ahead and executes the comand anyone even though i have "return PLUGIN_HANDLED" in the function cmd_access. Could someone please help me out, im abit lost. thanks Adam
Revelation is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode