help, count
#1

pawn Код:
forward Start(bool:redo);
public Start()
{
for(new i; i < MAX_PLAYERS; i++)
{
StopCounting--;
new string[256];
format(string,256,"~w~%d",StopCounting);
return GameTextForAll(string,1200,3);

if(StopCounting <= 0)
{
KillTimer(timer);
gaz = 0;
TogglePlayerControllable(i,1);
}
else
{
PlayerPlaySound(i,1056,0.0,0.0,0.0);
SetTimer("Start",1000,0);
SetTimer("gaz",1000,0);
gaz = 13;
}
}
return 1;
}

//----------


    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
                StopCounting = 3;
timer = SetTimerEx("Start", 0, 1, "d", playerid);
        return 1;
    }
    return 0;
}


Why does my count showing nonsenses? He runs very fast and goes up to -1500
Reply
#2

Why is your timer time set to 0?
pawn Код:
SetTimerEx("Start", 0, 1, "d", playerid);
And also why are you specifying a playerid, when you dont use it in your Start callback.

Your callback forward differs from the declaration:
pawn Код:
forward Start(bool:redo);
public Start()
Reply
#3

Why are you returning Gametext. It will not allow further code to be implemented

pawn Код:
forward Start(playerid);
public Start()
{
for(new i; i < MAX_PLAYERS; i++)
{
StopCounting--;
new string[256];
format(string,256,"~w~%d",StopCounting);
GameTextForAll(string,1200,3);
if(StopCounting <= 0)
{
KillTimer(timer);
gaz = 0;
TogglePlayerControllable(i,1);
}
else
{
PlayerPlaySound(i,1056,0.0,0.0,0.0);
SetTimer("Start",1000,0);
SetTimer("gaz",1000,0);
gaz = 13;
}
}
return 1;
}

//----------


    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
                StopCounting = 3;
                timer = SetTimerEx("Start", 1000, true, "d", playerid);
                return 1;
    }
    return 0;
}
Try This ^^
Reply
#4

Still not working, couting goes fast up to -1500
Reply
#5

I want to make timer which activates in 10 seconds for example and after 10 seconds counting starts from 5 to 1, then players gets unfeezed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)