#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
new g_Enebled[33];
new g_smoke;
new g_CreateSmoke;
public plugin_init()
{
register_plugin("Blocked Smoke", "1.0", "X-Team");
unregister_forward(FM_PrecacheEvent, g_smoke, 1);
register_forward(FM_PlaybackEvent, "FwdPlaybackEvent");
}
public plugin_precache( )
{
g_smoke = register_forward(FM_PrecacheEvent, "FwdPrecacheEvent", 1);
}
public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H){
g_Enebled[id] = 1;
}else{
g_Enebled[id] = 0;
}
}
public FwdPlaybackEvent(const flags, const invoker, const event, const Float:delay, const Float:origin[3], const Float:angles[3], const Float:fparam1, const Float:fparam2, const iparam1, const iparam2, const bparam1, const bparam2)
{
if(event != g_CreateSmoke)
return FMRES_IGNORED;
for (new id = 1; id <= get_maxplayers(); id++) {
if (g_Enebled[id]) {
continue
}
fm_playback_event(flags | FEV_HOSTONLY, id, event, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2)
}
return FMRES_SUPERCEDE;
}
public FwdPrecacheEvent(type, const name[])
{
if (equal("events/createsmoke.sc", name))
{
g_CreateSmoke = get_orig_retval();
return FMRES_HANDLED;
}
return FMRES_IGNORED;
}
#include <amxmodx>
#include <engine>
#include <fakemeta>
new g_Enebled[33];
new g_smoke;
new g_CreateSmoke;
public plugin_init()
{
register_plugin("Blocked Smoke", "1.0", "X-Team");
unregister_forward(FM_PrecacheEvent, g_smoke, 1);
register_forward(FM_PlaybackEvent, "FwdPlaybackEvent");
}
public plugin_precache( )
{
g_smoke = register_forward(FM_PrecacheEvent, "FwdPrecacheEvent", 1);
}
public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H){
g_Enebled[id] = 1;
}else{
g_Enebled[id] = 0;
}
}
public FwdPlaybackEvent(const flags, const invoker, const event, const Float:delay, const Float:origin[3], const Float:angles[3], const Float:fparam1, const Float:fparam2, const iparam1, const iparam2, const bparam1, const bparam2)
{
if(event != g_CreateSmoke)
return FMRES_IGNORED;
for (new id = 1; id <= get_maxplayers(); id++) {
if (g_Enebled[id]) {
continue
}
engfunc(EngFunc_PlaybackEvent, flags | FEV_HOSTONLY, id, event, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2)
}
return FMRES_SUPERCEDE;
}
public FwdPrecacheEvent(type, const name[])
{
if (equal("events/createsmoke.sc", name))
{
g_CreateSmoke = get_orig_retval();
return FMRES_HANDLED;
}
return FMRES_IGNORED;
}