Advertisement
Guest User

CurierJob by SenXD

a guest
Oct 22nd, 2015
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.43 KB | None | 0 0
  1. // Curier Job by SenXD :P
  2. // Nu stergeti creditele !!! :P
  3. // Atentie acest job necesita include-ul sscanf2 si zcmd ! Multa bafta !.
  4.  
  5. #include <a_samp>
  6. #include <zcmd>
  7. #include <sscanf2>
  8.  
  9.  
  10. // Definitie masina ...
  11. new MasinaCJ[MAX_PLAYERS];
  12. new CurierCP[MAX_PLAYERS];
  13.  
  14. #if defined FILTERSCRIPT
  15.  
  16. public OnFilterScriptInit()
  17. {
  18. print("\n--------------------------------------");
  19. print(" CurierJob by SenXD");
  20. print("--------------------------------------\n");
  21. return 1;
  22. }
  23.  
  24. public OnFilterScriptExit()
  25. {
  26. return 1;
  27. }
  28.  
  29. #else
  30.  
  31. main()
  32. {
  33. print("\n----------------------------------");
  34. print(" Gamemode-ul tau ....");
  35. print("----------------------------------\n");
  36. }
  37.  
  38. #endif
  39.  
  40. public OnGameModeInit()
  41. {
  42. // Don't use these lines if it's a filterscript
  43. SetGameModeText("Blank Script");
  44. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  45. return 1;
  46. }
  47.  
  48. public OnGameModeExit()
  49. {
  50. return 1;
  51. }
  52.  
  53. public OnPlayerRequestClass(playerid, classid)
  54. {
  55. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  56. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  57. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  58. return 1;
  59. }
  60.  
  61. public OnPlayerConnect(playerid)
  62. {
  63. return 1;
  64. }
  65.  
  66. public OnPlayerDisconnect(playerid, reason)
  67. {
  68. return 1;
  69. }
  70.  
  71. public OnPlayerSpawn(playerid)
  72. {
  73. return 1;
  74. }
  75.  
  76. public OnPlayerDeath(playerid, killerid, reason)
  77. {
  78. return 1;
  79. }
  80.  
  81. public OnVehicleSpawn(vehicleid)
  82. {
  83. return 1;
  84. }
  85.  
  86. public OnVehicleDeath(vehicleid, killerid)
  87. {
  88. return 1;
  89. }
  90.  
  91. public OnPlayerText(playerid, text[])
  92. {
  93. return 1;
  94. }
  95.  
  96. public OnPlayerCommandText(playerid, cmdtext[])
  97. {
  98. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  99. {
  100. // Do something here
  101. return 1;
  102. }
  103. return 0;
  104. }
  105.  
  106. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  107. {
  108. return 1;
  109. }
  110.  
  111. public OnPlayerExitVehicle(playerid, vehicleid)
  112. {
  113. if(vehicleid == MasinaCJ[playerid])
  114. {
  115. DestroyVehicle(MasinaCJ[playerid]);
  116. DisablePlayerCheckpoint(playerid);
  117. }
  118. return 1;
  119. }
  120.  
  121. public OnPlayerStateChange(playerid, newstate, oldstate)
  122. {
  123. return 1;
  124. }
  125.  
  126. public OnPlayerEnterCheckpoint(playerid)
  127. {
  128. if(CurierCP[playerid] == 1)
  129. {
  130. DisablePlayerCheckpoint(playerid);
  131. SetPlayerCheckpoint(playerid,2228.3223,-1340.3970,23.9833,7.0);
  132. CurierCP[playerid] = 2;
  133. }
  134.  
  135. else if(CurierCP[playerid] == 2)
  136. {
  137. DisablePlayerCheckpoint(playerid);
  138. SetPlayerCheckpoint(playerid,2417.4556,-1252.9042,23.8214,7.0);
  139. CurierCP[playerid] = 3;
  140. }
  141.  
  142. else if(CurierCP[playerid] == 3)
  143. {
  144. DisablePlayerCheckpoint(playerid);
  145. SetPlayerCheckpoint(playerid,2343.0027,-1582.6545,23.7398,7.0);
  146. CurierCP[playerid] = 4;
  147. }
  148.  
  149. else if(CurierCP[playerid] == 4)
  150. {
  151. DisablePlayerCheckpoint(playerid);
  152. SetPlayerCheckpoint(playerid,2319.5630,-1728.0426,13.3828,7.0);
  153. CurierCP[playerid] = 5;
  154. }
  155.  
  156. else if(CurierCP[playerid] == 5)
  157. {
  158. DisablePlayerCheckpoint(playerid);
  159. SetPlayerCheckpoint(playerid,2180.5444,-1750.6304,13.3750,7.0);
  160. CurierCP[playerid] = 6;
  161. }
  162.  
  163. else if(CurierCP[playerid] == 6)
  164. {
  165. DisablePlayerCheckpoint(playerid);
  166. SendClientMessage(playerid,-1,"Ati terminat de livrat coletele si ati castigat o suma de bani,felicitari!");
  167. GivePlayerMoney(playerid,random(45000));
  168. DestroyVehicle(MasinaCJ[playerid]);
  169. }
  170. return 1;
  171. }
  172.  
  173. public OnPlayerLeaveCheckpoint(playerid)
  174. {
  175. return 1;
  176. }
  177.  
  178. public OnPlayerEnterRaceCheckpoint(playerid)
  179. {
  180. return 1;
  181. }
  182.  
  183. public OnPlayerLeaveRaceCheckpoint(playerid)
  184. {
  185. return 1;
  186. }
  187.  
  188. public OnRconCommand(cmd[])
  189. {
  190. return 1;
  191. }
  192.  
  193. public OnPlayerRequestSpawn(playerid)
  194. {
  195. return 1;
  196. }
  197.  
  198. public OnObjectMoved(objectid)
  199. {
  200. return 1;
  201. }
  202.  
  203. public OnPlayerObjectMoved(playerid, objectid)
  204. {
  205. return 1;
  206. }
  207.  
  208. public OnPlayerPickUpPickup(playerid, pickupid)
  209. {
  210. return 1;
  211. }
  212.  
  213. public OnVehicleMod(playerid, vehicleid, componentid)
  214. {
  215. return 1;
  216. }
  217.  
  218. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  219. {
  220. return 1;
  221. }
  222.  
  223. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  224. {
  225. return 1;
  226. }
  227.  
  228. public OnPlayerSelectedMenuRow(playerid, row)
  229. {
  230. return 1;
  231. }
  232.  
  233. public OnPlayerExitedMenu(playerid)
  234. {
  235. return 1;
  236. }
  237.  
  238. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  239. {
  240. return 1;
  241. }
  242.  
  243. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  244. {
  245. return 1;
  246. }
  247.  
  248. public OnRconLoginAttempt(ip[], password[], success)
  249. {
  250. return 1;
  251. }
  252.  
  253. public OnPlayerUpdate(playerid)
  254. {
  255. return 1;
  256. }
  257.  
  258. public OnPlayerStreamIn(playerid, forplayerid)
  259. {
  260. return 1;
  261. }
  262.  
  263. public OnPlayerStreamOut(playerid, forplayerid)
  264. {
  265. return 1;
  266. }
  267.  
  268. public OnVehicleStreamIn(vehicleid, forplayerid)
  269. {
  270. return 1;
  271. }
  272.  
  273. public OnVehicleStreamOut(vehicleid, forplayerid)
  274. {
  275. return 1;
  276. }
  277.  
  278. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  279. {
  280. return 1;
  281. }
  282.  
  283. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  284. {
  285. return 1;
  286. }
  287.  
  288.  
  289. // Comenzile job-ului :
  290.  
  291.  
  292. CMD:startjob(playerid, params[])
  293. {
  294. if(!IsPlayerInRangeOfPoint(playerid,4.0,2165.9419,-1803.4484,13.3691)) return SendClientMessage(playerid,0xA72610FF,"Nu esti la jobul curier!");
  295. {
  296. MasinaCJ[playerid] = CreateVehicle(440,2165.9419,-1803.4484,13.3691,269.7691,1,3,-1,0);
  297. PutPlayerInVehicle(playerid,MasinaCJ[playerid],0);
  298. CurierCP[playerid] = 1;
  299. SetPlayerCheckpoint(playerid,2185.7839,-1752.5543,13.3750,7.0);
  300. }
  301. return 1;
  302. }
  303.  
  304. CMD:asd(playerid,params[])
  305. {
  306. SetPlayerPos(playerid,2165.9419,-1803.4484,13.3691);
  307. return 1;
  308. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement