Witam,
w jaki sposób mogę opóźnić blokowanie broni podczas rundy. Bo jak dostaje się bronie z mocy np odznak itp to nie blokuje broni i nie wiem jak opóźnić wykonanie tego warunku. Oto kod
#include <amxmodx>
#include <fakemeta_util>
new bool: firstRound = false;
new bool: firstRoundChecked = false;
public plugin_init()
{
register_plugin( "....", "1.0", "..." );
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 );
if ( firstRoundChecked && user_has_weapon( id, CSW_MP5NAVY ) )
fm_strip_user_gun( id, CSW_MP5NAVY );
if ( firstRoundChecked && user_has_weapon( id, CSW_AK47 ) )
fm_strip_user_gun( id, CSW_AK47 );
if ( firstRoundChecked && user_has_weapon( id, CSW_M4A1 ) )
fm_strip_user_gun( id, CSW_M4A1 );
}
/* 3 */
public pRoundEnd()
{
if ( firstRoundChecked )
{
firstRound = false;
firstRoundChecked = false;
}
}
/* 0 */
public pRestart()
{
firstRound = true;
firstRoundChecked = false;
}
Za każdą pomoc będę wdzięczny.


Dodatki SourceMod












