Help with my job system. /jobstart not recognised
#1

First off - sorry for the messy coding :L I'm new to it so that's why it's messy. Now, I've been working on a job system. I've created a command to do /jobstart which at this moment in time, is only to work within my trucker job. It then goes around a series of checkpoints etc. The problem is, whenever I enter the Tanker (first trucker vehicle) the command does nothing and when I enter the Linerunner (second trucker vehicle) it actually ejects me saying "You do not have the trucker job", which is only supposed to come up when the player doesn't have the trucker job, obviously. Can anyone help me out please? Code below:

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
	{
	    new vModel = GetVehicleModel(GetPlayerVehicleID(playerid));
 		if (vModel== 403 || vModel==514 && job[playerid]!=1)
 		{
			RemovePlayerFromVehicle(playerid);
  			SendClientMessage(playerid,0xAA3333AA,"You do not have the trucker job");
 		}
 		else if (vModel== 448 && job[playerid]!=2)
 		{
  			RemovePlayerFromVehicle(playerid);
  			SendClientMessage(playerid,0xAA3333AA,"You do not have the pizza-boy job");
 		}
 		else if (vModel== 408 && job[playerid]!=3)
 		{
			RemovePlayerFromVehicle(playerid);
			SendClientMessage(playerid,0xAA3333AA,"You do not have the trashmaster job");
    	}
	}
	return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)