Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new JobCar[5]; //Change to ammount of vehicles you want
- JobCar[0] = AddStaticVehicle(448,2119.3611,-1776.7987,12.9909,88.5099,151,1);
- JobCar[1] = AddStaticVehicle(448,2119.2058,-1771.6847,12.9933,94.7364,151,1);
- JobCar[2] = AddStaticVehicle(448,2119.0703,-1765.4340,12.9952,81.5577,151,1);
- JobCar[3] = AddStaticVehicle(448,2119.3611,-1776.7987,12.9909,88.5099,151,1);
- JobCar[4] = AddStaticVehicle(448,2119.2058,-1771.6847,12.9933,94.7364,151,1);
- JobCar[5] = AddStaticVehicle(448,2119.0703,-1765.4340,12.9952,81.5577,151,1);
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new vId = GetPlayerVehicleID(playerid);
- if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
- {
- for(new i = 0; i < sizeof(JobCar); i++)
- {
- if(vId == JobCar[i])
- {
- if(GetPlayerJob[playerid] == 0) //Change this to check if player job IS NOT the job they should have for that vehicle
- {
- RemovePlayerFromVehicle(playerid);
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement