Help me Activity problem ( countdown )
#1

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 :
PHP код:
public CountDownSawnUzi2(seconds)
{
    for(new 
0GetMaxPlayers(); i++)
    {
        if(
IsPlayerConnected(i) && InSawnUzi[i] == true)
            {
            if(
seconds)
            {
                
format(strsizeof(str), "~r~%d"seconds);
                
GameTextForAll(str1000,6);
            }
              if(
seconds 0)
            {
                
seconds --;
                
cdTimerSU SetTimerEx("CountDownSawnUzi2"10000"%d"seconds,-1);
                
TogglePlayerControllable(i,false);
            }
            if(
seconds == 0)
            {
                for(new 
0GetMaxPlayers(); p++)
                {
                    if(
IsPlayerConnected(p) && InSawnUzi[p] == true)
                        {
                        
TogglePlayerControllable(p,true);
                        
GameTextForPlayer(p,"~h~~n~Go",1000,6);
                    }
                }
            }
        }
    }
     return 
1;

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
Reply
#2

cdTimerSU = SetTimerEx("CountDownSawnUzi2", 1000, 0, "%d", seconds);

This forum requires that you wait 120 seconds between posts. Please try again in 25 seconds.
Reply
#3

dont work
Reply
#4

help me plz
Reply
#5

some one ?
Reply
#6

help plz ?
Reply
#7

pawn Код:
public CountDownSawnUzi2(seconds)
{
    for(new i,g=GetMaxPlayers(); i < g; i++)
    {
        if(IsPlayerConnected(i) && InSawnUzi[i])
        {
            if(seconds) {
                format(str, sizeof(str), "~r~%d", seconds);
                GameTextForPlayer(i, str, 1000,6);
                TogglePlayerControllable(i,false);
            }else{
                TogglePlayerControllable(i,true);
                GameTextForPlayer(i,"~h~~n~Go",1000,6);
            }
        }
    }
    if(seconds)
        SetTimerEx("CountDownSawnUzi2", 1000, false, "d",seconds-1);
    return 1;
}
Reply
#8

ok its work but when its on 0 Seconds its do go all the time it not stop
Reply
#9

some one !?
Reply
#10

pawn Код:
public CountDownSawnUzi2(seconds)
{
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected(i) && InSawnUzi[i])
        {
            if(seconds)
            {
                new str[15];
                format(str, sizeof(str), "%d", seconds);
                GameTextForPlayer(i, str, 1000, 6);
                TogglePlayerControllable(i, 0);
            }
            else if(seconds == 0)
            {
                TogglePlayerControllable(i, 1);
                GameTextForPlayer(i, "Go", 1000, 6);
            }
        }
    }
    if(seconds != 0)
    {
        SetTimerEx("CountDownSawnUzi2", 1000, 0, "%d", seconds-1);
    }
    return 1;
}
how about this one?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)