19.01.2017, 21:49
Код:
Trucker_EndJob(playerid) { if (APlayerData[playerid][JobStarted] == true) { // Clear the Mafia-wanted status of the vehicle (or trailer) in the array "AVehicleData" if (APlayerData[playerid][TrailerID] == 0) AVehicleData[APlayerData[playerid][VehicleID]][MafiaLoad] = false; // The player has no trailer, so clear his main vehicle as wanted by the mafia else AVehicleData[APlayerData[playerid][TrailerID]][MafiaLoad] = false; // The player has a trailer, so clear his trailer as wanted by the mafia // Clear all data about the job from the player, so he can start a new one APlayerData[playerid][JobStarted] = false; APlayerData[playerid][JobStep] = 0; APlayerData[playerid][JobID] = 0; APlayerData[playerid][VehicleTimerTime] = 0; APlayerData[playerid][VehicleID] = 0; APlayerData[playerid][TrailerID] = 0; APlayerData[playerid][LoadID] = 0; APlayerData[playerid][JobLoc1] = 0; APlayerData[playerid][JobLoc2] = 0; APlayerData[playerid][MafiaLoad] = false; // Delete the checkpoint DisablePlayerCheckpoint(playerid); // Reset the missiontext TextDrawSetString(APlayerData[playerid][MissionText], Trucker_NoJobText); // Kill the LoadingTimer KillTimer(APlayerData[playerid][LoadingTimer]); // Check if the player has been overloaded if (APlayerData[playerid][Overloaded] == true) { // Clear the overloaded status of the player APlayerData[playerid][Overloaded] = false; // Check if the player has a wanted level of 2 or higher if (GetPlayerWantedLevel(playerid) >= 2) SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) - 2); // Reduce the wanted level by 2 else SetPlayerWantedLevel(playerid, 0); // If the player has a wanted level of less than 2, reset the wanted level to 0 } } return 1; }