/*======================================================== Author: Dutchmeat Simple SpiritBomb Crash Fix ========================================================*/ #include #include new FLOATNM[10] = "Dutchmeat" new blockSB[33] public plugin_init() { register_plugin("Spiritbomb nuke fix","1.0",FLOATNM) register_forward( FM_PlayerPostThink, "PlayerPostThink"); return PLUGIN_CONTINUE } public server_frame() { new clip,ammo for(new a = 1; a <= get_playersnum(); a++) { new weapon = get_user_weapon( a, clip, ammo ) if(weapon == 12 && blockSB[a] > 4){ client_cmd(a,"invnext") } } } public resetblockSB(id){ blockSB[id] = 0 } public PlayerPostThink(id) { if ( pev ( id , pev_button ) & (1<<0) && get_pdata_int(id, 199) ) // if the player is holding the firing button { blockSB[id] += 1 } set_task(2.0,"resetblockSB",id) return PLUGIN_CONTINUE }