02.03.2011, 15:31
That when a trailer disconnects from a truck, that it cancels a checkpoint?
new Timer[MAX_PLAYERS];
forward CheckAttached(playerid);
public CheckAttached(playerid);
{
new veh = GetPlayerVehicleID(playerid);
if(!IsTrailerAttachedToVehicle(veh)) return DisablePlayerCheckpoint(playerid);
KillTimer(Timer[playerid]);
}
Timer[playerid] = SetTimerEx("CheckAttached", 1000, 1, "i", vehicleid); // When you attach trailer or create the checkpoint