Advertisement
Guest User

[FS]Posao Bus Vozac

a guest
Aug 25th, 2014
675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.28 KB | None | 0 0
  1. // ========== [ Pocetak FilterSkripte ] ========== //
  2. // Posao Bus Vozac By:Tony (((NE MENJAJ KREDITS)))
  3. // ========== [ Include ] ========== //
  4. #include <a_samp>
  5. #include <zcmd>
  6. // ========== [ Boje ] ========== //
  7. #define COLOR_DARKGOLD 0x808000AA
  8. #define COLOR_RED 0xFF0000AA
  9. #define COLOR_YELLOW 0xFFFF00AA
  10. #define COLOR_YELLOWGREEN 0xADFF2FAA
  11.  
  12. forward UnfreezePlayer(playerid);
  13. // ========== [ Enum Pinfo NE DIRAJ!!! ] ========== //
  14. enum pInfo
  15. {
  16. pPosaoUgovor,
  17. pLevel,
  18. pPosao,
  19. pOprema,
  20. };
  21. new PlayerInfo[MAX_PLAYERS][pInfo];
  22. // ========== [ NE DIRAJ ] ========== //
  23. new BusJob[256];
  24. // ========== [ Busevi ] ========== //
  25. public OnFilterScriptInit()
  26. {
  27. AddStaticVehicle(437,1804.5135,-1931.1837,13.5578,0.7978,105,20); // Bus1
  28. AddStaticVehicle(437,1800.1434,-1931.1538,13.5507,1.6479,123,20); // Bus2
  29. AddStaticVehicle(437,1795.4452,-1931.2524,13.5483,0.9752,98,20); // Bus3
  30. AddStaticVehicle(437,1790.9561,-1931.1577,13.5614,0.3414,54,7); // Bus4
  31. AddStaticVehicle(437,1786.0616,-1931.1292,13.5378,359.1724,125,21); // Bus5
  32. AddStaticVehicle(437,1781.4387,-1931.2439,13.5490,0.3812,79,7); // Bus6
  33. AddStaticVehicle(437,1776.9261,-1931.1481,13.5474,2.1805,87,7); // Bus7
  34. }
  35. // ========== [ ! ] ========== //
  36. public OnPlayerCommandText(playerid, cmdtext[])
  37. {
  38. return 1;
  39. }
  40. // ========== [ Komanda kad udjete u vozilo da vam izbaci dialog kako se koriste komande !! ] ========== //
  41. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  42. {
  43. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
  44. {
  45. SendClientMessage(playerid, COLOR_RED, "Da krenete sa Prevozenjem putnika kucaj /busp");
  46. SendClientMessage(playerid, COLOR_RED,"Ako niste uzeli opremu kucajte /busoprema");
  47. }
  48. return 0;
  49. }
  50. ////////////////////////////////////////////////////////////////////////////////
  51. public OnPlayerEnterCheckpoint(playerid)
  52. {
  53. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
  54. {
  55. if(BusJob[playerid] == 1){
  56. BusJob[playerid] = 2;
  57. SetPlayerCheckpoint(playerid,1807.5831,-1890.8634,13.5418);
  58. SendClientMessage(playerid,COLOR_YELLOWGREEN,"Pratite markere i bit ce te placeni");
  59. TogglePlayerControllable(playerid,0);
  60. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  61. GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
  62. return 1;
  63. }
  64. if(BusJob[playerid] == 2){
  65. BusJob[playerid] = 3;
  66. SetPlayerCheckpoint(playerid,1823.7743,-1628.7023,13.5162);
  67. TogglePlayerControllable(playerid,0);
  68. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  69. GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
  70. return 1;
  71. }
  72. if(BusJob[playerid] == 3){
  73. BusJob[playerid] = 4;
  74. SetPlayerCheckpoint(playerid,2041.0093,-1649.6680,13.6818);
  75. TogglePlayerControllable(playerid,0);
  76. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  77. GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
  78. return 1;
  79. }
  80. if(BusJob[playerid] == 4){
  81. BusJob[playerid] = 5;
  82. SetPlayerCheckpoint(playerid,2080.6152,-1791.8184,13.5194);
  83. TogglePlayerControllable(playerid,0);
  84. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  85. GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
  86. return 1;
  87. }
  88. if(BusJob[playerid] == 5){
  89. BusJob[playerid] = 6;
  90. SetPlayerCheckpoint(playerid,2078.4829,-1917.9031,13.4651);
  91. TogglePlayerControllable(playerid,0);
  92. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  93. GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
  94. return 1;
  95. }
  96. if(BusJob[playerid] == 6){
  97. BusJob[playerid] = 7;
  98. SetPlayerCheckpoint(playerid,1847.4159,-2164.2288,13.5156);
  99. TogglePlayerControllable(playerid,0);
  100. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  101. GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
  102. return 1;
  103. }
  104. if(BusJob[playerid] == 7){
  105. BusJob[playerid] = 8;
  106. SetPlayerCheckpoint(playerid,1532.7483,-1942.1265,18.3391);
  107. TogglePlayerControllable(playerid,0);
  108. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  109. GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
  110. return 1;
  111. }
  112. if(BusJob[playerid] == 8){
  113. BusJob[playerid] = 9;
  114. SetPlayerCheckpoint(playerid,1617.0437,-1875.9316,13.5161);
  115. TogglePlayerControllable(playerid,0);
  116. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  117. GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
  118. return 1;
  119. }
  120. if(BusJob[playerid] == 9){
  121. BusJob[playerid] = 10;
  122. SetPlayerCheckpoint(playerid,1694.4108,-1837.9043,13.5889);
  123. TogglePlayerControllable(playerid,0);
  124. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  125. GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
  126. return 1;
  127. }
  128. if(BusJob[playerid] == 10){
  129. BusJob[playerid] = 11;
  130. SetPlayerCheckpoint(playerid,1759.6416,-1887.8652,13.6923,90.2938);
  131. TogglePlayerControllable(playerid,0);
  132. SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
  133. GameTextForPlayer(playerid, "~y~Pricekajte da putnici izadju iz busa.",1500,6);
  134. return 1;
  135. }
  136. if(BusJob[playerid] == 11){
  137. BusJob[playerid] = 0;
  138. DisablePlayerCheckpoint(playerid);
  139. SendClientMessage(playerid,COLOR_YELLOWGREEN, "_________________PLATA__________________");
  140. SendClientMessage(playerid,COLOR_YELLOWGREEN,"Zavrsili ste sa poslom i dobili platu iznos:1500$.");
  141. SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
  142. GivePlayerMoney(playerid,1500); //stavite koliko zelite moja procena je 1500$
  143. }
  144. }
  145. return 1;
  146. }
  147. ////////////////////////////////////////////////////////////////////////////////
  148. public OnPlayerExitVehicle(playerid, vehicleid)
  149. {
  150. if(BusJob[playerid] > 0)
  151. {
  152. BusJob[playerid] = 0;
  153. SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
  154. SendClientMessage(playerid, COLOR_RED, "Napustili ste posao, necete dobiti novac.");
  155. SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
  156. DisablePlayerCheckpoint(playerid);
  157. }
  158. }
  159. ////////////////////////////////////////////////////////////////////////////////
  160. CMD:busoprema(playerid,params[])
  161. {
  162. SetPlayerSkin(playerid, 253);
  163. SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________OPREMA__________________");
  164. SendClientMessage(playerid,COLOR_YELLOWGREEN,"Uzeli ste opremu, mozete poceti sa radom!");
  165. SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
  166. return 1;
  167. }
  168. ////////////////////////////////////////////////////////////////////////////////
  169. COMMAND:posaobus(playerid, params[])
  170. {
  171. if(PlayerInfo[playerid][pPosao] == 0)
  172. {
  173. if(!IsPlayerInRangeOfPoint(playerid, 2012.6134,-1729.3796,13.1536,10))
  174. {
  175.  
  176. PlayerInfo[playerid][pPosao] = 1;
  177. PlayerInfo[playerid][pPosaoUgovor] = 3;
  178. SendClientMessage(playerid,COLOR_YELLOWGREEN, "_________________Bus Vozac__________________");
  179. SendClientMessage(playerid,COLOR_YELLOWGREEN, "Cestitamo, postali ste Bus Vozac!");
  180. SendClientMessage(playerid,COLOR_YELLOWGREEN, "Komande posla : /busoprema Pocni posao sa/busp!");
  181. SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
  182. }
  183. }
  184. else
  185. SendClientMessage(playerid,0xADFF2FAA, "Vec imate posao!");
  186. return 1;
  187. }
  188. ////////////////////////////////////////////////////////////////////////////////
  189. CMD:busp(playerid,params[])
  190. {
  191. if(PlayerInfo[playerid][pPosao] == 0) return SendClientMessage(playerid,COLOR_RED,"Niste zaposlen kao Bus Vozac");
  192. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
  193. {
  194. BusJob[playerid] = 1;
  195. new name[MAX_PLAYER_NAME], string[48];
  196. GetPlayerName(playerid, name, sizeof(name));
  197. format(string, sizeof(string), "%s Je sada Bus Vozac.", name );
  198. SendClientMessageToAll(COLOR_YELLOW, string);
  199. SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
  200. SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
  201. SendClientMessage(playerid,COLOR_YELLOW,"Prati markere da bi dobio novac!");
  202. SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
  203. }
  204. return 1;
  205. }
  206. ////////////////////////////////////////////////////////////////////////////////
  207. public UnfreezePlayer(playerid)
  208. {
  209. if(IsPlayerConnected(playerid))
  210. {
  211. TogglePlayerControllable(playerid,1);
  212. }
  213. return 1;
  214. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement