Hi, well i try to make it work when you get sg teleport, but when you don't, make it work like normal smoke
I got it by doing this in the code:
PHP Code:
new bool:gHasBatman[SH_MAXSLOTS+1] // its like [MAX_PLAYERS+1];
public plugin_init()
{
register_forward(FM_EmitSound, "forward_emitsound")
register_forward(FM_PlaybackEvent, "forward_playbackevent", false)
// we do not precaching, but retrieving the indexes
g_spriteid_steam1 = engfunc(EngFunc_PrecacheModel, "sprites/steam1.spr")
g_eventid_createsmoke = engfunc(EngFunc_PrecacheEvent, 1, "events/createsmoke.sc")
}
public forward_playbackevent(flags, invoker, eventindex)
{
if ( !gHasBatman[invoker] ) return FMRES_IGNORED
// we do not need a large amount of smoke
if( eventindex == g_eventid_createsmoke)
return FMRES_SUPERCEDE
return FMRES_IGNORED
}
but I get error 4 every time the SG explodes
HTML Code:
L 03/02/2022 - 13:27:11: [AMXX] Displaying debug trace (plugin "sh_batman.amxx", version "1.2.0.14")
L 03/02/2022 - 13:27:11: [AMXX] Run time error 4: index out of bounds
L 03/02/2022 - 13:27:11: [AMXX] [0] sh_batman.sma::forward_playbackevent (line 3