SA-MP Forums Archive
command bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: command bug (/showthread.php?tid=291776)



command bug - marik1322 - 21.10.2011

when i use that command everything ok!!
but when another players use this command the SetTimer not working.
PHP код:
command(bombplayeridparams[])
{
    if(
HasTer[playerid] == 1)
    {
        
SendClientMessage(playeridGreen"You need wait 15 seconds Before use command again");
        return 
1;
    }
    if(
IsTer[playerid] == 1337)
    {
        
SetPlayerAttachedObject(playerid11906010.39804.22440.0000);
        
SetPlayerHealth(playerid9999999.999);
        
CreateExplosionEx(playerid9.00800);
        
CreateExplosionEx(playerid10.01800);
        
CreateExplosionEx(playerid11.02800);
        
CreateExplosionEx(playerid12.03800);
        
CreateExplosionEx(playerid13.04800);
        
CreateExplosionEx(playerid14.05800);
        
CreateExplosionEx(playerid15.06800);
        
CreateExplosionEx(playerid16.07800);
        
CreateExplosionEx(playerid17.08800);
        
CreateExplosionEx(playerid18.09800);
        
CreateExplosionEx(playerid19.010800);
        
CreateExplosionEx(playerid20.011800);
        
CreateExplosionEx(playerid21.012800);
        
CreateExplosionEx(playerid22.013800);
        
TogglePlayerControllable(playerid0);
        if ( 
playerCountsplayerid ] > ) return 0;
        
timer[playerid] = SetTimerEx("FifteenBomb",1000,true,"i",playerid);
        
SetTimer("bomb"8000false);
        
HasTer[playerid] =1;
        
SetTimer("TerReset",150000);
        return 
1;
    }
    if(
IsTer[playerid] == 1338)
    {
        
SetPlayerAttachedObject(playerid11906110.39804.22440.0000);
        
SetPlayerHealth(playerid9999999.999);
        
CreateExplosionEx(playerid9.00800);
        
CreateExplosionEx(playerid10.01800);
        
CreateExplosionEx(playerid11.02800);
        
CreateExplosionEx(playerid12.03800);
        
CreateExplosionEx(playerid13.04800);
        
CreateExplosionEx(playerid14.05800);
        
CreateExplosionEx(playerid15.06800);
        
CreateExplosionEx(playerid16.07800);
        
CreateExplosionEx(playerid17.08800);
        
CreateExplosionEx(playerid18.09800);
        
CreateExplosionEx(playerid19.010800);
        
CreateExplosionEx(playerid20.011800);
        
CreateExplosionEx(playerid21.012800);
        
CreateExplosionEx(playerid22.013800);
        
TogglePlayerControllable(playerid0);
        if ( 
playerCountsplayerid ] > ) return 0;
        
timer[playerid] = SetTimerEx("FifteenBomb",1000,true,"i",playerid);
        
SetTimer("bomb"8000false);
        
HasTer[playerid] =1;
        
SetTimer("TerReset",150000);
        return 
1;
    }
    else
    {
         
SendClientMessage(playeridAdmin"You are not allowed to use that command");
    }
    return 
1;




Re: command bug - CyNiC - 21.10.2011

Maybe the others timers have that be SetTimerEx too.

Post the functions Bomb and TerReset.