Count Down Timer
#1

It's not counting down it just spamming numbers and i want to add a 30 timer.
Код:
forward TruckCheck(playerid);
public TruckCheck(playerid)
{
        if (IsPlayerInAnyVehicle(playerid) == 0)
        {
                const time = 10; //This would be 10sec
                //GameTextForPlayer(playerid,!"Get back in your TRUCK!~n~Or Reconnect your trailer!~n~[10]",1000,5);
                @countdown(playerid,time);
                return 1;
        }
        else if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) == 0)
        {
            GameTextForPlayer(playerid, "Reconnect your trailer!", 1000, 5);
            return 1;
        }
        return 0;
}

@countdown(playerid,x);@countdown(playerid,x) {
    if(--x == 0)  return GameTextForPlayer(playerid,!"Los Los Los!",1000,5);
    new str[8];
    valstr(str,x);
    GameTextForPlayer(playerid,str,1000,5);
    return SetTimerEx(!"@countdown",999,0,!"ii",playerid,x);
}
inside my work command
Код:
SetTimerEx("TruckCheck", 1000, true, "i", playerid);
Reply


Messages In This Thread
Count Down Timer - by DerickClark - 22.08.2015, 18:40
Re: Count Down Timer - by thaKing - 22.08.2015, 19:11
Re: Count Down Timer - by DerickClark - 22.08.2015, 19:17
Re: Count Down Timer - by DerickClark - 22.08.2015, 21:10
Re: Count Down Timer - by Roberto80 - 22.08.2015, 22:04
Re: Count Down Timer - by DerickClark - 22.08.2015, 22:10
Re: Count Down Timer - by thaKing - 22.08.2015, 22:44
Re: Count Down Timer - by DerickClark - 22.08.2015, 22:46
Re: Count Down Timer - by thaKing - 22.08.2015, 22:50
Re: Count Down Timer - by DerickClark - 22.08.2015, 23:05

Forum Jump:


Users browsing this thread: 4 Guest(s)