Testdraw countdown help?
#3

This callback has a CountDown to be inputted and it will be displayed as a GameTextForPlayer. You can edit it accordingly

pawn Код:
//Countdown
forward CountDown(playerid, seconds);
public CountDown(playerid, seconds)
{
    new string[50];
    if(seconds > 0)
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        PlayerPlaySound(playerid, 1056, X, Y, Z);
        format(string, sizeof(string), "~R~%d", seconds);
        GameTextForPlayer(playerid, string, 1000, 3);
        seconds = seconds -1;
        SetTimerEx("CountDown", 1000, 0, "ii", playerid, seconds);
        return 1;
    }
    if(seconds == 0)
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        PlayerPlaySound(playerid, 1057, X, Y, Z);
        GameTextForPlayer(playerid, "~G~Start!!!", 1000, 3);
        TogglePlayerControllable(playerid, 1);
        return 1;
    }
    return 1;
}
How to use this callback?
pawn Код:
// THIS WILL SHOW YOU COUNTDOWN OF 500 Seconds.
CountDown(playerid, 500);
Reply


Messages In This Thread
Testdraw countdown help? - by vvhy - 23.04.2012, 01:22
Re: Testdraw countdown help? - by MP2 - 23.04.2012, 01:26
Re: Testdraw countdown help? - by Ballu Miaa - 23.04.2012, 01:38
Re: Testdraw countdown help? - by vvhy - 23.04.2012, 01:42
Re: Testdraw countdown help? - by Ballu Miaa - 23.04.2012, 02:14

Forum Jump:


Users browsing this thread: 2 Guest(s)