Raised This Month: $12 Target: $400
 3% 

AMX Block Sprays


Post New Thread Reply   
 
Thread Tools Display Modes
Joce93
Senior Member
Join Date: Feb 2016
Old 02-04-2016 , 10:46   Re: AMX Block Sprays
Reply With Quote #21

Quote:
Originally Posted by teame06 View Post
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; }


Hello, where do we have to put this code ?
I rent a server and want to disable sprays.
Joce93 is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-06-2016 , 10:59   Re: AMX Block Sprays
Reply With Quote #22

You have to put it on a plain text file, then to compile it and install.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Reply


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 22:29.


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