Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. //Filterscript by LarryTiger
  2.  
  3. #include <a_samp>
  4.  
  5. #define COLOR_RED 0xFF0000AA
  6. #define COLOR_YELLOW 0xFFFF00AA
  7.  
  8.  
  9. new flyjobrunning = 0;
  10. new info;
  11.  
  12. public OnFilterScriptInit()
  13. {
  14. AddStaticVehicle(519,1729.8932,-2415.7798,14.4727,149.2040,1,1); //
  15. AddStaticVehicle(519,1739.6110,-2543.2544,13.5469,353.2043,1,1); //
  16. AddStaticVehicle(519,1786.4404,-2542.7852,13.5469,269.2301,1,1); //
  17. AddStaticVehicle(519,1818.4126,-2428.5762,13.5547,178.3859,1,1); //
  18. AddStaticVehicle(519,1767.3907,-2455.8711,13.5547,179.0126,1,1); //
  19.  
  20.  
  21. info = CreatePickup(1239,1,1748.7014,-2421.0500,13.5547,-1);
  22. }
  23.  
  24. public OnPlayerCommandText(playerid, cmdtext[])
  25. {
  26. if (strcmp("/startflight", cmdtext, true, 10) == 0)
  27. {
  28. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
  29. {
  30. flyjobrunning = 1;
  31. SetPlayerCheckpoint(playerid, -1253.9714,238.6661,14.1484, 10);
  32. SetPlayerCheckpoint(playerid, 1053.8138,-2361.4197,115.3864, 10);
  33. SetPlayerCheckpoint(playerid, -177.6360,-1237.1620,173.7164, 10);
  34. SetPlayerCheckpoint(playerid, -1219.2340,-107.7123,15.0656, 10);
  35. GameTextForPlayer(playerid, "~g~Ai pornit pilotajul, succes!", 3000, 3);
  36. new name[MAX_PLAYER_NAME], string[48];
  37. GetPlayerName(playerid, name, sizeof(name));
  38. format(string, sizeof(string), "%s este pilot.", name );
  39. SendClientMessageToAll(COLOR_RED, string);
  40.  
  41. return 1;
  42. }
  43. SendClientMessage(playerid, COLOR_RED,"Trebuie sa fi in avion pentru a incepe pilotajul");
  44. }
  45. if (strcmp("/flyinfo", cmdtext, true, 10) == 0)
  46. {
  47. SendClientMessage(playerid, COLOR_YELLOW, "Va trebui sa intri prin checkpoint-uri cu avionul.");
  48. SendClientMessage(playerid, COLOR_YELLOW, "Dupa ce vei urca in avion, tasteaza /startflight si dute prin checkpoint-urile rosi.");
  49. return 1;
  50. }
  51. return 0;
  52. }
  53. public OnPlayerEnterCheckpoint(playerid)
  54. {
  55. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
  56. {
  57. GivePlayerCash(playerid, 100000);
  58. GameTextForPlayer(playerid, "~g~Munca a luat sfarsit, felicitari!", 3000, 3);
  59. SetVehicleToRespawn(1);
  60. DisablePlayerCheckpoint(playerid);
  61. flyjobrunning = 500;
  62. SetPlayerPos(playerid, 1729.8932,-2415.7798,14.4727);
  63. }
  64. }
  65. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  66. {
  67. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
  68. {
  69. SendClientMessage(playerid, COLOR_RED, "Pentru a porni jobul tasteaza /startflight cand te afli in avion");
  70. }
  71. return 0;
  72. }
  73. public OnPlayerExitVehicle(playerid, vehicleid)
  74. {
  75. if((flyjobrunning) == 1)
  76. {
  77. flyjobrunning = 0;
  78. SendClientMessage(playerid, COLOR_RED, "Ai pierdut cursa!");
  79.  
  80. }else if((flyjobrunning) == 0){
  81.  
  82. //Nothing
  83. }
  84. }
  85.  
  86. public OnPlayerPickUpPickup(playerid, pickupid)
  87. {
  88. if(pickupid == info)
  89. {
  90. GameTextForPlayer(playerid, "~g~Bine ai venit la jobul de pilotaj, foloseste /flyinfo pentru informatii", 3000, 3);
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement