PDA

View Full Version : Eh,I want a countdown Gametext/textdraw[+REP]


[SU]Spartan
05/05/2016, 05:46 AM
I would like to make a countdown gametext/textdraw idk how it works,Countdown from 15 to 0 in the middle of screen,I will rep.With a checkpoint,if player moves from checkpoint,countdown canceled.

Micko123
05/05/2016, 06:07 AM
It is GameTextForPlayer
Try using these

https://wiki.sa-mp.com/wiki/SetTimer
http://forum.sa-mp.com/showthread.php?t=171959

xTURBOx
05/05/2016, 09:39 AM
you mean like, for playerwise or for all players
i mean if one player uses /countdown does it displays for him or for all the players in the server?

Nin9r
05/05/2016, 09:54 AM
With gametext:

public counter()
{
count--;
switch(count)
{
case 0:
{
GameTextForAll("r~Go go go!", 1110, 5);
KillTimer(counter);
}
case 1: GameTextForAll("~ r~2~w~ seconds.", 1110, 5);
case 2: GameTextForAll(" ~r~3~w~ seconds.", 1110, 5);
}

Command:

new count;
CMD:count(playerid, params[])
{
count = 3;
counter = SetTimer("counter", 1000, true);
return 1;
}
It will display the count for all players.

Also, if you want to kill the timer on any checkpoint, you have to add this on that cp : KillTimer(counter);

Check it on 'OnPlayerEnterCheckpoint(playerid)'