Question with this checkpoint
#1

Код:
public OnPlayerEnterCheckpoint(playerid)
{
	if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 498)
 	{
		if(PlayerJobInfo[playerid][UPSduty] == 2)
		{
		    DisablePlayerCheckpoint(playerid);
			PlayerJobInfo[playerid][UPSduty] = 8;
			SetPlayerCheckpoint(playerid,2391.0957,-2095.6282,13.5538,5.0);
			SendClientMessage(playerid, -1, "*Get back to the trucker job area in order to get your paycheck!");
			PlayerJobInfo[playerid][UPScargo] = 0;
			return 1;
   		}
   		else if(PlayerJobInfo[playerid][UPSduty] == 3)
   		{
		    DisablePlayerCheckpoint(playerid);
			PlayerJobInfo[playerid][UPSduty] = 8;
			SetPlayerCheckpoint(playerid,2391.0957,-2095.6282,13.5538,5.0);
			SendClientMessage(playerid, -1, "*Get back to the trucker job area in order to get your paycheck!");
			PlayerJobInfo[playerid][UPScargo] = 0;
			return 1;
   		}
   		else if(PlayerJobInfo[playerid][UPSduty] == 4)
   		{
		    DisablePlayerCheckpoint(playerid);
			PlayerJobInfo[playerid][UPSduty] = 8;
			SetPlayerCheckpoint(playerid,2391.0957,-2095.6282,13.5538,5.0);
			SendClientMessage(playerid, -1, "*Get back to the trucker job area in order to get your paycheck!");
			PlayerJobInfo[playerid][UPScargo] = 0;
			return 1;
   		}
   		else if(PlayerJobInfo[playerid][UPSduty] == 5)
   		{
		    DisablePlayerCheckpoint(playerid);
			PlayerJobInfo[playerid][UPSduty] = 8;
			SetPlayerCheckpoint(playerid,2391.0957,-2095.6282,13.5538,5.0);
			SendClientMessage(playerid, -1, "*Get back to the trucker job area in order to get your paycheck!");
			PlayerJobInfo[playerid][UPScargo] = 0;
			return 1;
   		}
   		else if(PlayerJobInfo[playerid][UPSduty] == 6)
   		{
		    DisablePlayerCheckpoint(playerid);
			PlayerJobInfo[playerid][UPSduty] = 8;
			SetPlayerCheckpoint(playerid,2391.0957,-2095.6282,13.5538,5.0);
			SendClientMessage(playerid, -1, "*Get back to the trucker job area in order to get your paycheck!");
			PlayerJobInfo[playerid][UPScargo] = 0;
			return 1;
   		}
   		else if(PlayerJobInfo[playerid][UPSduty] == 7)
   		{
		    DisablePlayerCheckpoint(playerid);
			PlayerJobInfo[playerid][UPSduty] = 8;
			SetPlayerCheckpoint(playerid,2391.0957,-2095.6282,13.5538,5.0);
			SendClientMessage(playerid, -1, "*Get back to the trucker job area in order to get your paycheck!");
			PlayerJobInfo[playerid][UPScargo] = 0;
			return 1;
   		}
   		else if(PlayerJobInfo[playerid][UPSduty] == 8)
   		{
   		    if(PlayerJobInfo[playerid][UPSjoblevel] == 1)
   		    {
   		        GivePlayerMoney(playerid, 10);
   		        DisablePlayerCheckpoint(playerid);
   		        PlayerJobInfo[playerid][UPSlevel]++;
   		    }
   		    else if(PlayerJobInfo[playerid][UPSjoblevel] == 2)
   		    {
   		        GivePlayerMoney(playerid, 20);
   		        DisablePlayerCheckpoint(playerid);
   		        PlayerJobInfo[playerid][UPSlevel]++;
   		    }
			else if(PlayerJobInfo[playerid][UPSjoblevel] == 3)
			{
			    GivePlayerMoney(playerid, 30);
			    DisablePlayerCheckpoint(playerid);
			    PlayerJobInfo[playerid][UPSlevel]++;
			}
			else if(PlayerJobInfo[playerid][UPSjoblevel] == 4)
			{
			    GivePlayerMoney(playerid, 40);
			    DisablePlayerCheckpoint(playerid);
			    PlayerJobInfo[playerid][UPSlevel]++;
			}
			else if(PlayerJobInfo[playerid][UPSjoblevel] == 5)
			{
			    GivePlayerMoney(playerid, 50);
			    DisablePlayerCheckpoint(playerid);
			    PlayerJobInfo[playerid][UPSlevel]++;
			}
			else if(PlayerJobInfo[playerid][UPSjoblevel] == 6)
			{
			    GivePlayerMoney(playerid, 60);
			    DisablePlayerCheckpoint(playerid);
			    PlayerJobInfo[playerid][UPSlevel]++;
			}
			else if(PlayerJobInfo[playerid][UPSjoblevel] == 7)
			{
			    GivePlayerMoney(playerid, 70);
			    DisablePlayerCheckpoint(playerid);
			    PlayerJobInfo[playerid][UPSlevel]++;
			}
			else if(PlayerJobInfo[playerid][UPSjoblevel] == 8)
			{
			    GivePlayerMoney(playerid, 250);
			    DisablePlayerCheckpoint(playerid);
			    PlayerJobInfo[playerid][UPSlevel]++;
			}
   		}
	}
	return 1;
}
I'm having a problem with this checkpoint system. In the beginning (the checkpoints that get set via /getcargo) work 100 percent and disable when they're supposed to, and then tell them they have to go collect their pay from the truck place. However, the checkpoint doesn't pay you and then doesn't disable right after. Does anyone know what I did wrong from looking at this?
Reply


Messages In This Thread
Question with this checkpoint - by K9IsGodly - 06.07.2014, 21:38
Re: Question with this checkpoint - by nmader - 06.07.2014, 23:30
Re: Question with this checkpoint - by K9IsGodly - 06.07.2014, 23:58

Forum Jump:


Users browsing this thread: 1 Guest(s)