19.05.2018, 15:26
The trailer disconnect at a sharp bend and the GameTextForPlayer pops out that it has 30 seconds to connect the trailer, if it does not connect the trailer it will be respawn and the mission is canceled. How to make?
forward FinishMissionTrucking(playerid); forward TuckerCheckTrail(playerid); new TrailerToWork[MAX_PLAYERS]; CMD:startmission(playerid){ new TrailerToWork[playerid] = GetVehicleTrailer(vehicleid); SetTimerEx("TuckerCheckTrail", 1000, false, "i", playerid); return 1; } public TuckerCheckTrail(playerid){ if(!IsTrailerAttachedToVehicle(TrailerToWork[playerid])){ GameTextForPlayer(playerid, "Warning: Grab the trailer before the time runs out!", 5000, 2); SetTimerEx("FinishMissionTrucking", 30000, false, "i", playerid); } return 1; } public FinishMissionTrucking(playerid) return /*function to destroy the mission*/