26.11.2011, 20:35
hi i need a timer checking if the trailer has become detached from my truck whilst going to a checkpoint
if so i want something like:
Run this timer now:
ifTrailerDetachedFromVehicle during mission do this....
client message " you have 30 seconds to re-attach trailer or you will fail your mission
set timer
public timer
disablecheckpoint;
ive tried this in my job if statement but it didnt work:
but it didnt work because i need to have it running inside a timer constantly when on a mission, how the fuck do i do this ? helppppp?
if so i want something like:
Run this timer now:
ifTrailerDetachedFromVehicle during mission do this....
client message " you have 30 seconds to re-attach trailer or you will fail your mission
set timer
public timer
disablecheckpoint;
ive tried this in my job if statement but it didnt work:
PHP Code:
if(TruckerJob[playerid] == 2){
TruckerJob[playerid] = 3;
SetPlayerCheckpoint(playerid,2819.7258,-1685.1962,9.3214,10);
SendClientMessage(playerid, COLOR_RED, "Deliver Xtreme Team supplies to the stadium");
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid,COLOR_RED,"re-attach trailer within 30 seconds or job failed!");
SetTimer("TimerOne",30000,false);
return 1;
}
return 1;
}
PHP Code:
public TimerOne(playerid)
{
SendClientMessage(playerid, COLOR_RED,"You failed to re-attach trailer you have been fired.");
DisablePlayerCheckpoint(playerid);
return 1;
}