How to make count down and put player in car - 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: How to make count down and put player in car (
/showthread.php?tid=281865)
How to make count down and put player in car -
MA_proking - 08.09.2011
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.
Re: How to make count down and put player in car -
=WoR=Varth - 08.09.2011
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.
Re: How to make count down and put player in car -
MA_proking - 08.09.2011
Not working ....
Still count down not showing
Re: How to make count down and put player in car -
=WoR=Varth - 08.09.2011
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