Moved from "Support/Help".
So you want a plugin that blocks spraying?
Edit:
Code:
#include <amxmodx>
#include <engine>
static const PLUGIN[] = "Spray Control";
static const VERSION[] = "0.1";
static const AUTHOR[] = "v3x";
static const CVAR[] = "mp_canspray";
new g_CvarSpray;
public plugin_init() {
register_plugin(PLUGIN , VERSION , AUTHOR);
register_impulse(201 , "sprayed");
g_CvarSpray = register_cvar(CVAR , "1");
}
public sprayed(id) {
if(!get_pcvar_num(g_CvarSpray)) {
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
Cvar:
mp_canspray <0|1> (default: 1)
I think that's how you use the new pcvar native.
__________________