View Single Post
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 10-07-2006 , 19:16   Re: AMX Block Sprays
Reply With Quote #9

This is the correct way to stop people from using their spray. If what VEN says about event 23 that it just more than spray. Then that is a bad way of doing this.

Code:
/* USAGE: amx_blocksprays <1/0> -- Enables or Disables Plugin */ #include <amxmodx> #include <engine> #include <amxmisc> #define PLUGIN "Block Sprays" #define VERSION "1.0" #define AUTHOR "29th ID" #define SPRAY 201 new g_pCvarEnabled public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     g_pCvarEnabled = register_cvar("amx_blocksprays", "1") } // Fakemeta way would be Hooking the forward FM_CmdStart. // An example of how to block certain command using FM_CmdStart // <a href="http://forums.alliedmods.net/showthread.php?p=351823#post351823" target="_blank" rel="nofollow noopener">http://forums.alliedmods.net/showthr...823#post351823</a> public client_impulse(id, impulse) {     if(get_pcvar_num(g_pCvarEnabled) && impulse == SPRAY)     {         client_print(id, print_chat, "[AMXX] You are not allowed to spray.");         return PLUGIN_HANDLED;     }     return PLUGIN_CONTINUE; }
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06