unguru2009

Job Pilotaj

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