Advertisement
Guest User

Rens

a guest
Mar 16th, 2010
1,214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define COLOR_RED 0xFF0000AA
  4. #define COLOR_YELLOW 0xFFFF00AA
  5.  
  6.  
  7. new flyjobrunning = 0;
  8. new info;
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. AddStaticVehicle(519,1729.8932,-2415.7798,14.4727,149.2040,1,1); //
  13.  
  14. info = CreatePickup(1239,1,1748.7014,-2421.0500,13.5547,-1);
  15. }
  16.  
  17. public OnPlayerCommandText(playerid, cmdtext[])
  18. {
  19. if (strcmp("/startflight", cmdtext, true, 10) == 0)
  20. {
  21. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
  22. {
  23. flyjobrunning = 1;
  24. SetPlayerCheckpoint(playerid, -1253.9714,238.6661,14.1484, 10);
  25. GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
  26. new name[MAX_PLAYER_NAME], string[48];
  27. GetPlayerName(playerid, name, sizeof(name));
  28. format(string, sizeof(string), "%s is now delivering goods with a plane.", name );
  29. SendClientMessageToAll(COLOR_RED, string);
  30.  
  31. return 1;
  32. }
  33. SendClientMessage(playerid, COLOR_RED,"You have to be in the jobplane to start the job");
  34. }
  35. if (strcmp("/flyinfo", cmdtext, true, 10) == 0)
  36. {
  37. SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the planeload to the airport in San Fierro.");
  38. SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
  39. SendClientMessage(playerid, COLOR_YELLOW, "If you enter the truck, type /startflight and a red marker will appear.");
  40. SendClientMessage(playerid, COLOR_YELLOW, "Just fly to the marker and you're done.");
  41. return 1;
  42. }
  43. return 0;
  44. }
  45. public OnPlayerEnterCheckpoint(playerid)
  46. {
  47. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
  48. {
  49. GivePlayerMoney(playerid, 10000);
  50. GameTextForPlayer(playerid, "~g~You Completed the job, well done!", 3000, 3);
  51. SetVehicleToRespawn(1);
  52. DisablePlayerCheckpoint(playerid);
  53. flyjobrunning = 0;
  54. SetPlayerPos(playerid, 1729.8932,-2415.7798,14.4727);
  55. }
  56. }
  57. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  58. {
  59. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
  60. {
  61. SendClientMessage(playerid, COLOR_RED, "You can start the Fly job with /startflight");
  62. }
  63. return 0;
  64. }
  65. public OnPlayerExitVehicle(playerid, vehicleid)
  66. {
  67. if((flyjobrunning) == 1)
  68. {
  69. flyjobrunning = 0;
  70. SendClientMessage(playerid, COLOR_RED, "You left the plane, you failed the job.");
  71.  
  72. }else if((flyjobrunning) == 0){
  73.  
  74. //Nothing
  75. }
  76. }
  77.  
  78. public OnPlayerPickUpPickup(playerid, pickupid)
  79. {
  80. if(pickupid == info)
  81. {
  82. GameTextForPlayer(playerid, "~g~Welcome at the Fly job, use /flyinfo to know more", 3000, 3);
  83. }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement