AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   timerefresh (https://forums.alliedmods.net/showthread.php?t=16966)

mysticssjgoku4 08-23-2005 19:15

timerefresh
 
Hmm...I'm not sure why, but this isn't catching the command like I want, and stopping it. Nor is it even working at all. Any help? Thanks.
Before I get rude comments about me being bad because im blocking something that may be important, just to let you know, this is really for TS, users often bind a key to time refresh when jumping a wall, and they keep hitting this button, and it allows them to keep jumping non-stop. I'd like to stop it, because it ruins rp.

Code:
////////////////////////////////////////////// //-------------------------------------------- //-NO TIME REFRESH---Remo Williams------------ //-------------------------------------------- //////////////////////////////////////////////// #include <amxmodx> #include <amxmisc> new warning[1]=(0) public plugin_init(){     register_clcmd("timerefresh","nono",1,"- Time Refresh is not allowed.") } public nono(id) {     if(!is_user_connected(id)) {         return PLUGIN_HANDLED     }     new name[32], authid[32]     get_user_name(id,name,31)     get_user_authid(id,authid,31)         if(warning[id] == 0) {         client_print(0,print_chat,"WARNING!!! ***Violation!!*** TimeRefresh Not Allowed. Warning 1 of 3 Issued to: %s. 3 Warnings = BAN for 1337 Minutes.",name)         client_print(0,print_chat,"STEAMID: %s, LOGGED for first warning issued!",authid)         warning[id] = 1         return PLUGIN_HANDLED     }     if(warning[id] == 1) {         client_print(0,print_chat,"WARNING!!! ***Violation!!*** TimeRefresh Not Allowed. Warning 2 of 3 Issued to: %s. 3 Warnings = BAN for 1337 Minutes.",name)         client_print(0,print_chat,"STEAMID: %s, LOGGED for second warning issued!",authid)         warning[id] = 2         return PLUGIN_HANDLED     }     if(warning[id] == 2) {         client_print(0,print_chat,"WARNING!!! ***Violation!!*** TimeRefresh Not Allowed. Warning 3 of 3 Issued to: %s. 3 Warnings = BAN for 1337 Minutes.",name)         client_print(0,print_chat,"STEAMID: %s, LOGGED for last warning issued!",authid)         client_print(0,print_chat,"Player: %s, Has Received Maximum number of warnings allowed. Consequencial Actions are being executed!",name)         server_cmd("banid 1337 '%s' kick",authid)         warning[id] = 3         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED }

XxAvalanchexX 08-23-2005 19:24

It's possible that timerefresh is client-side and not sent the server, which means AMXx won't be able to catch it.

Freecode 08-23-2005 19:31

try registering clientCommand event and catch timerefresh


All times are GMT -4. The time now is 14:29.

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