Witam, przedstawiam plugin który blokuje scouta oraz awp w pierwszej rundzie, chcę ten plugin przerobić żeby scout i awp były blokowane od pierwszej rundy do końca mapy. Da rade?
#include <amxmodx> #include <fakemeta_util> new bool: firstRound = false; new bool: firstRoundChecked = false; public plugin_init() { register_plugin( "AWP & SCOUT BLOKADA W PIERWSZEJ RUNDZIE ", "1.0", "NafukanY" ); register_event( "TextMsg", "pRestart", "a", "2&#Game_C"); // 0 register_event( "TextMsg", "pRestart", "a", "2&#Game_will_restart_in" ); // 0 register_event( "CurWeapon", "pCurWeapon", "be", "1=1" ); // 2 register_logevent( "pRoundStart", 2, "1=Round_Start"); // 1 register_logevent( "pRoundEnd", 2, "1=Round_End" ); // 3 } /* 1 */ public pRoundStart() { if ( firstRound ) { firstRoundChecked = true; firstRound = false; } } /* 2 */ public pCurWeapon(id) { if ( firstRoundChecked && user_has_weapon( id, CSW_AWP ) ) fm_strip_user_gun( id, CSW_AWP ); } public pCurWeapon(id) { if ( firstRoundChecked && user_has_weapon( id, CSW_SCOUT ) ) fm_strip_user_gun( id, CSW_SCOUT ); } /* 3 */ public pRoundEnd() { if ( firstRoundChecked ) { firstRound = false; firstRoundChecked = false; } } /* 0 */ public pRestart() { firstRound = true; firstRoundChecked = false; }