21.10.2011, 14:31
when i use that command everything ok!!
but when another players use this command the SetTimer not working.
but when another players use this command the SetTimer not working.
PHP код:
command(bomb, playerid, params[])
{
if(HasTer[playerid] == 1)
{
SendClientMessage(playerid, Green, "You need wait 15 seconds Before use command again");
return 1;
}
if(IsTer[playerid] == 1337)
{
SetPlayerAttachedObject(playerid, 1, 19060, 1, 0.3980, 4.2244, 0.0000);
SetPlayerHealth(playerid, 9999999.999);
CreateExplosionEx(playerid, 9.0, 0, 800);
CreateExplosionEx(playerid, 10.0, 1, 800);
CreateExplosionEx(playerid, 11.0, 2, 800);
CreateExplosionEx(playerid, 12.0, 3, 800);
CreateExplosionEx(playerid, 13.0, 4, 800);
CreateExplosionEx(playerid, 14.0, 5, 800);
CreateExplosionEx(playerid, 15.0, 6, 800);
CreateExplosionEx(playerid, 16.0, 7, 800);
CreateExplosionEx(playerid, 17.0, 8, 800);
CreateExplosionEx(playerid, 18.0, 9, 800);
CreateExplosionEx(playerid, 19.0, 10, 800);
CreateExplosionEx(playerid, 20.0, 11, 800);
CreateExplosionEx(playerid, 21.0, 12, 800);
CreateExplosionEx(playerid, 22.0, 13, 800);
TogglePlayerControllable(playerid, 0);
if ( playerCounts[ playerid ] > 0 ) return 0;
timer[playerid] = SetTimerEx("FifteenBomb",1000,true,"i",playerid);
SetTimer("bomb", 8000, false);
HasTer[playerid] =1;
SetTimer("TerReset",15000, 0);
return 1;
}
if(IsTer[playerid] == 1338)
{
SetPlayerAttachedObject(playerid, 1, 19061, 1, 0.3980, 4.2244, 0.0000);
SetPlayerHealth(playerid, 9999999.999);
CreateExplosionEx(playerid, 9.0, 0, 800);
CreateExplosionEx(playerid, 10.0, 1, 800);
CreateExplosionEx(playerid, 11.0, 2, 800);
CreateExplosionEx(playerid, 12.0, 3, 800);
CreateExplosionEx(playerid, 13.0, 4, 800);
CreateExplosionEx(playerid, 14.0, 5, 800);
CreateExplosionEx(playerid, 15.0, 6, 800);
CreateExplosionEx(playerid, 16.0, 7, 800);
CreateExplosionEx(playerid, 17.0, 8, 800);
CreateExplosionEx(playerid, 18.0, 9, 800);
CreateExplosionEx(playerid, 19.0, 10, 800);
CreateExplosionEx(playerid, 20.0, 11, 800);
CreateExplosionEx(playerid, 21.0, 12, 800);
CreateExplosionEx(playerid, 22.0, 13, 800);
TogglePlayerControllable(playerid, 0);
if ( playerCounts[ playerid ] > 0 ) return 0;
timer[playerid] = SetTimerEx("FifteenBomb",1000,true,"i",playerid);
SetTimer("bomb", 8000, false);
HasTer[playerid] =1;
SetTimer("TerReset",15000, 0);
return 1;
}
else
{
SendClientMessage(playerid, Admin, "You are not allowed to use that command");
}
return 1;
}