25.10.2010, 19:26
hellow everyone ,
i have problem with my activity system ( countdown )
i try to do countdown 2.
count down need to be ON when the players teleport to the activity spawn
this is my code :
and the problem in this code its do 5 , 4 ,3 ,Go , Go , Go
and its need to do 5 , 4 , 3 ,2 , 1 , Go
i hope you understanding me.
tnx
i have problem with my activity system ( countdown )
i try to do countdown 2.
count down need to be ON when the players teleport to the activity spawn
this is my code :
PHP код:
public CountDownSawnUzi2(seconds)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i) && InSawnUzi[i] == true)
{
if(seconds)
{
format(str, sizeof(str), "~r~%d", seconds);
GameTextForAll(str, 1000,6);
}
if(seconds > 0)
{
seconds --;
cdTimerSU = SetTimerEx("CountDownSawnUzi2", 1000, 0, "%d", seconds,-1);
TogglePlayerControllable(i,false);
}
if(seconds == 0)
{
for(new p = 0; p < GetMaxPlayers(); p++)
{
if(IsPlayerConnected(p) && InSawnUzi[p] == true)
{
TogglePlayerControllable(p,true);
GameTextForPlayer(p,"~h~~n~Go",1000,6);
}
}
}
}
}
return 1;
}
and its need to do 5 , 4 , 3 ,2 , 1 , Go
i hope you understanding me.
tnx