How to make count down and put player in car
#1

pawn Код:
forward race2(playerid);
public race2(playerid)
{
     SetPlayerPos(playerid,1286.4811,-1712.4708,12.8618);
     TogglePlayerControllable(playerid,0);
     SetTimer("start", 5000, false);
}

forward start(playerid);
public start(playerid)
{
TogglePlayerControllable(playerid,1);
}
I m using this but I want that it show player 5 second countdown so How can I create.
Reply
#2

pawn Код:
new
        Count[MAX_PLAYERS],
        Timer[MAX_PLAYERS]:

forward race2(playerid);
public race2(playerid)
{
     SetPlayerPos(playerid,1286.4811,-1712.4708,12.8618);
     TogglePlayerControllable(playerid,0);
     Count[playerid] = 5;
     Timer[playerid] = SetTimerEx("start", 1000, true,"d",playerid);
}

forward start(playerid);
public start(playerid)
{
if(Count[playerid]!=0) Count[playerid]--;
else
{
    TogglePlayerControllable(playerid,1);
    KillTimer(Timer[playerid]);
}
return 1;
}
https://sampwiki.blast.hk/wiki/SetTimerEx

EDITED again, my bad.
Reply
#3

Not working ....
Still count down not showing
Reply
#4

Quote:
Originally Posted by MA_proking
Посмотреть сообщение
Not working ....
Still count down not showing
https://sampwiki.blast.hk/wiki/GameTextForPlayer
https://sampwiki.blast.hk/wiki/TextDrawCreate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)