Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. new JobCar[5]; //Change to ammount of vehicles you want
  2.  
  3.  
  4. JobCar[0] = AddStaticVehicle(448,2119.3611,-1776.7987,12.9909,88.5099,151,1);
  5. JobCar[1] = AddStaticVehicle(448,2119.2058,-1771.6847,12.9933,94.7364,151,1);
  6. JobCar[2] = AddStaticVehicle(448,2119.0703,-1765.4340,12.9952,81.5577,151,1);
  7. JobCar[3] = AddStaticVehicle(448,2119.3611,-1776.7987,12.9909,88.5099,151,1);
  8. JobCar[4] = AddStaticVehicle(448,2119.2058,-1771.6847,12.9933,94.7364,151,1);
  9. JobCar[5] = AddStaticVehicle(448,2119.0703,-1765.4340,12.9952,81.5577,151,1);
  10.  
  11.  
  12. public OnPlayerStateChange(playerid, newstate, oldstate)
  13. {
  14. new vId = GetPlayerVehicleID(playerid);
  15. if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
  16. {
  17. for(new i = 0; i < sizeof(JobCar); i++)
  18. {
  19. if(vId == JobCar[i])
  20. {
  21. if(GetPlayerJob[playerid] == 0) //Change this to check if player job IS NOT the job they should have for that vehicle
  22. {
  23. RemovePlayerFromVehicle(playerid);
  24.  
  25. }
  26. }
  27. }
  28. }
  29. return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement