Advertisement
Guest User

enterveh

a guest
Feb 7th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. public override void OnPlayerEnterVehicle(User player)
  2. {
  3. var rUser = GetUserByID(player.UniqueNetworkIdentifier);
  4.  
  5. if (rUser != null)
  6. {
  7. if (rUser.PlayerJob.JobName == null) return;
  8.  
  9. ReturnPlayerNative(player, 88888, Hash.GET_VEHICLE_PED_IS_USING, new int(),
  10. delegate (object o)
  11. {
  12.  
  13. Console.WriteLine("Returned Vehicle ID: " + ((int)o).ToString());
  14. }, player);
  15.  
  16. if (rUser.PlayerJob == GameManagement.GetJob("taxi"))
  17. //if (ReturnPlayerNative.VehicleHash.Taxi = true) { }
  18.  
  19. //TODO: in next versions of API, add "vehicle hash check for TAXI"
  20. {
  21. SendNotificationToPlayer(player,"Use ~b~\"/taxi begin\"~w~ to start providing taxi services.\nUse ~b~\"/taxi stop\"~w~ to cancel.");
  22. }
  23.  
  24. /*if (!IsPlayerInRangeOfPoint(player, -1034.62f, -2732.11f, 13.756f, 15)) // Radius Last
  25. {
  26. //SetPlayerPos(playerid, 1587.5613, -2689.1929, 771.5931);
  27. }*/
  28.  
  29. if (rUser.PlayerJob == GameManagement.GetJob("police"))
  30. //TODO: in next versions of API, add "vehicle hash check for TAXI"
  31. {
  32. SendNotificationToPlayer(player, "Use ~g~\"/cop start\"~w~ to go on duty.\nUse ~b~\"/cop stop\"~w~ to go off duty");
  33. }
  34.  
  35. // Companies
  36. if (rUser.PlayerJob == GameManagement.GetJob("ecola"))
  37.  
  38. {
  39. SendNotificationToPlayer(player, "Use ~g~\"/routes to view a list of delivery routes");
  40. }
  41. if (rUser.PlayerJob == GameManagement.GetJob("postop"))
  42.  
  43. {
  44. SendNotificationToPlayer(player, "Use ~g~\"/routes to view a list of delivery routes");
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement