Count Down Timer
#2

Maybe something like this will work
PHP код:
new trckTime[MAX_PLAYERS];
forward TruckCheck(playerid);
public 
TruckCheck(playerid)
{
        if (
IsPlayerInAnyVehicle(playerid) == 0) {
                
truckTime[playerid]++;
                new 
str[64];
                
format(strsizeof(str), "Get back in your truck! [time left %d]"10 truckTime[playerid]);
                
GameTextForPlayer(istr10003);
                
                if (
truckTime[playerid] >= 10) {
                    
// Do stuff here
                    
truckTime[playerid] = 0;
                }
                return 
1;
        }
        else if (
IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) == 0)
        {
            
GameTextForPlayer(playerid"Reconnect your trailer!"10005);
            return 
1;
        }
        return 
0;

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: 2 Guest(s)