[Ajuda] Player e kickado quando descarrega!
#9

Quote:
Originally Posted by IlanZ
Посмотреть сообщение
O code de descarregamento
Код:
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;
}
Isso? '--' ;-;
Reply


Messages In This Thread
Player e kickado quando descarrega! - by Pequeno - 19.01.2017, 21:22
Re: Player e kickado quando descarrega! - by RazorGuigo - 19.01.2017, 21:26
Re: Player e kickado quando descarrega! - by Pequeno - 19.01.2017, 21:34
Re: Player e kickado quando descarrega! - by IlanZ - 19.01.2017, 21:40
Re: Player e kickado quando descarrega! - by Pequeno - 19.01.2017, 21:42
Programando e Relaxando! - by RazorGuigo - 19.01.2017, 21:46
Re: Programando e Relaxando! - by Pequeno - 19.01.2017, 21:47
Re: Player e kickado quando descarrega! - by IlanZ - 19.01.2017, 21:47
Re: Player e kickado quando descarrega! - by Pequeno - 19.01.2017, 21:49
Programando e Gambiarrando! - by RazorGuigo - 19.01.2017, 21:49

Forum Jump:


Users browsing this thread: 2 Guest(s)