Advertisement
Guest User

Untitled

a guest
Nov 4th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.64 KB | None | 0 0
  1. public OnFilterScriptInit()
  2. {
  3. BuilderActor = CreateActor(16, 1254.1410, -1265.7305, 13.3705, 358.4537);
  4. SetActorInvulnerable(BuilderActor, true);
  5. ApplyActorAnimation(BuilderActor, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1);
  6.  
  7. AddStaticPickup(1275, 23, 2182.8179,-2297.7180,13.5469);
  8. Create3DTextLabel("{006EFF}Loader Job!{FFFFFF}\nSu dung /batdaucongviec de bac dau cong viec.\n/ngunglamviec de ngung lam viec.", -1, 2182.8179,-2297.7180,13.5469, 10.0,0);
  9.  
  10.  
  11.  
  12. // Builder
  13. CreateObject(11081, 1253.47888, -1238.73682, 21.98707, 0.00000, 0.00000, 0.00000);
  14. CreateObject(1684, 1257.44678, -1268.18860, 13.92266, 0.00000, 0.00000, -180.00000);
  15. CreateObject(3504, 1248.59839, -1269.02271, 13.85367, 0.00000, 0.00000, 0.00000);
  16. CreateObject(3504, 1245.22815, -1269.02271, 13.85370, 0.00000, 0.00000, 0.00000);
  17. CreateObject(3504, 1241.80103, -1269.02271, 13.85370, 0.00000, 0.00000, 0.00000);
  18. CreateObject(1380, 1242.71594, -1255.90039, 36.20860, 0.00000, 0.00000, 0.00000);
  19. CreateObject(1391, 1242.84509, -1256.15466, 67.51294, 0.00000, 0.00000, 0.00000);
  20. CreateObject(1388, 1242.78784, -1256.14575, 78.81348, 3.14159, 0.00000, -36.32735);
  21. CreateObject(944, 1280.83032, -1238.00964, 13.88971, 0.00000, 0.00000, 0.00000);
  22. CreateObject(944, 1280.82617, -1239.37219, 13.88971, 0.00000, 0.00000, 0.00000);
  23. CreateObject(944, 1280.81775, -1240.77649, 13.88971, 0.00000, 0.00000, 0.00000);
  24. CreateObject(944, 1280.82617, -1239.37219, 15.26536, 0.00000, 0.00000, 0.00000);
  25. CreateObject(2359, 1280.74414, -1240.79858, 14.79832, 0.00000, 0.00000, 0.00000);
  26. CreateObject(925, 1264.98474, -1236.76953, 17.18457, 0.00000, 0.00000, 88.80002);
  27. CreateObject(3573, 1262.30530, -1249.57727, 15.40564, 0.00000, 0.00000, 0.00000);
  28. CreateObject(2567, 1268.85315, -1232.81580, 17.88041, 0.00000, 0.00000, 0.00000);
  29. CreateObject(3796, 1265.99060, -1251.27612, 18.09540, 0.00000, 0.00000, 0.00000);
  30. CreateObject(2669, 1271.85730, -1251.04346, 14.35794, 6.00000, 0.00000, 0.00000);
  31. CreateObject(2669, 1246.29199, -1256.84241, 13.53976, 0.00000, 0.00000, -268.85983);
  32. CreateObject(1465, 1282.14600, -1267.90417, 13.61396, 0.00000, 0.00000, -90.47998);
  33. CreateObject(1465, 1282.14600, -1265.25549, 13.63090, 0.00000, 0.00000, -90.48000);
  34. CreateObject(1465, 1281.98218, -1262.63489, 12.24269, 0.00000, -18.00000, 1.80000);
  35. CreateObject(1465, 1282.14600, -1259.91467, 13.63090, 0.00000, 0.00000, -90.48000);
  36. CreateObject(1465, 1282.14600, -1257.23779, 13.63090, 0.00000, 0.00000, -90.48000);
  37. CreateObject(1465, 1282.14600, -1257.23779, 15.48013, 0.00000, 0.00000, -90.48000);
  38. CreateObject(1465, 1282.14600, -1259.91467, 15.48010, 0.00000, 0.00000, -90.48000);
  39. CreateObject(1465, 1282.14600, -1262.59583, 15.48010, 0.00000, 0.00000, -90.48000);
  40. CreateObject(1465, 1282.14600, -1265.25549, 15.48010, 0.00000, 0.00000, -90.48000);
  41. CreateObject(1465, 1282.14600, -1267.90417, 15.48010, 0.00000, 0.00000, -90.48000);
  42. CreateObject(3864, 1281.10425, -1248.87158, 18.57323, 0.00000, 0.00000, 0.00000);
  43. CreateObject(3864, 1266.49414, -1268.06592, 18.57320, 0.00000, 0.00000, -90.00000);
  44. CreateObject(19791, 1268.58093, -1236.00977, 6.05160, 0.00000, 0.00000, 0.00000);
  45. CreateObject(19357, 1242.21143, -1256.64771, 35.47490, 0.00000, 90.00000, 0.00000);
  46. CreateObject(19357, 1242.20984, -1253.93250, 35.47490, 0.00000, 90.00000, 0.00000);
  47. CreateObject(19357, 1244.22314, -1257.11230, 35.47490, 0.00000, 90.00000, 0.00000);
  48. CreateObject(1473, 1271.83289, -1241.87573, 15.56858, 0.00000, 0.00000, 0.00000);
  49. CreateObject(1473, 1274.27112, -1235.94006, 15.38793, 11.00000, 0.00000, 90.63998);
  50. CreateObject(1473, 1275.77148, -1235.92285, 14.32175, 11.00000, 0.00000, 90.63998);
  51. return 1;
  52. }
  53.  
  54. public OnPlayerConnect(playerid)
  55. {
  56. Working[playerid] = 0;
  57. LastSkin[playerid] = 0;
  58. BuilderCP[playerid] = 0;
  59.  
  60. // Map
  61. RemoveBuildingForPlayer(playerid, 1388, 1238.3750, -1258.2813, 57.2031, 0.25);
  62. RemoveBuildingForPlayer(playerid, 1391, 1238.3750, -1258.2734, 44.6641, 0.25);
  63. return 1;
  64. }
  65.  
  66. public OnPlayerDisconnect(playerid, reason)
  67. {
  68. return 1;
  69. }
  70.  
  71. public OnPlayerSpawn(playerid)
  72. {
  73. SetPlayerPos(playerid, 1265.9968, -1251.3204, 18.0954);
  74. return 1;
  75. }
  76.  
  77. public OnPlayerDeath(playerid, killerid, reason)
  78. {
  79. return 1;
  80. }
  81.  
  82. public OnVehicleSpawn(vehicleid)
  83. {
  84. return 1;
  85. }
  86.  
  87. public OnVehicleDeath(vehicleid, killerid)
  88. {
  89. return 1;
  90. }
  91.  
  92. public OnPlayerText(playerid, text[])
  93. {
  94. return 1;
  95. }
  96.  
  97. public OnPlayerCommandText(playerid, cmdtext[])
  98. {
  99. if(strcmp("/batdaucongviec", cmdtext, true, 10) == 0)
  100. {
  101. if(!PlayerToPoint(5.0, playerid, 2185.1680,-2296.9434,13.5469)) return 1;
  102. if(Working[playerid] == 0)
  103. {
  104. Working[playerid] = 1;
  105. LastSkin[playerid] = GetPlayerSkin(playerid);
  106. SetPlayerSkin(playerid, 146);
  107. new x = random(2);
  108. if(x == 0) {
  109. SetPlayerCheckpoint(playerid, 2215.3472,-2264.7737,13.5547, 2.0);
  110. }
  111. if(x == 1) {
  112. SetPlayerCheckpoint(playerid, 2204.4368,-2224.4597,13.5469, 2.0);
  113. }
  114. if(x == 2 || x == 3) {
  115. SetPlayerCheckpoint(playerid, 2231.3125,-2285.3193,14.3751, 2.0);
  116. }
  117. BuilderCP[playerid] = 1;
  118. }
  119. else SendClientMessage(playerid, 0xA8FA82FF, "Ban da bat dau cong viec! Neu ban muon ngung lam viec /ngunglamviec.");
  120. return 1;
  121. }
  122.  
  123. if(strcmp("/ngunglamviec", cmdtext, true, 10) == 0)
  124. {
  125. if(!PlayerToPoint(5.0, playerid, 2185.1680,-2296.9434,13.5469)) return 1;
  126. if(Working[playerid] == 1)
  127. {
  128. SetPlayerSkin(playerid, LastSkin[playerid]);
  129. DisablePlayerCheckpoint(playerid);
  130. RemovePlayerAttachedObject(playerid,0);
  131. ClearAnimations(playerid);
  132. SetPlayerSpecialAction(playerid, 0);
  133. BuilderCP[playerid] = 0;
  134. Working[playerid] = 0;
  135. }
  136. else SendClientMessage(playerid, 0xA8FA82FF, "[!] Ban chua lam cong viec nay!");
  137. return 1;
  138. }
  139. return 0;
  140. }
  141.  
  142. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  143. {
  144. return 1;
  145. }
  146.  
  147. public OnPlayerExitVehicle(playerid, vehicleid)
  148. {
  149. return 1;
  150. }
  151.  
  152. public OnPlayerStateChange(playerid, newstate, oldstate)
  153. {
  154. return 1;
  155. }
  156.  
  157. public OnPlayerEnterCheckpoint(playerid)
  158. {
  159. if(BuilderCP[playerid] == 1)
  160. {
  161. DisablePlayerCheckpoint(playerid);
  162. new randobj = random(3);
  163. if(randobj == 0) {
  164. SetPlayerAttachedObject( playerid, 0, 2060, 1, 0.094999, 0.359999, -0.049999, 2.4, -90.3, 0.000000, 0.865, 0.896999, 1.162,1,0 );//0.935883, 1.000000, 0.508070 );
  165. }
  166. else if(randobj == 1) {
  167. SetPlayerAttachedObject( playerid, 0, 1271, 1, 0.270999, 0.601999, 0, 0, 0, 0, 1, 1, 1, 0, 0);
  168. }
  169. else if(randobj == 2) {
  170. SetPlayerAttachedObject( playerid, 0, 1353, 1, 0.238547, 0.448155, 0.000000, 277.985870, 87.919158, 352.250915, 0.317783, 1.000000, 0.308136 );
  171. }
  172. else if(randobj == 3) {
  173. SetPlayerAttachedObject(playerid, 5, 2060, 1, 0.076312, 0.437522, 0.033127, 108.700759, 77.424743, -101.376228, 1.025472, 1.000000, 1.000000);
  174. }
  175.  
  176. new x = random(3);
  177. if(x == 0 || x == 1) {
  178. SetPlayerCheckpoint(playerid, 2164.1389, -2270.1873, 13.3207, 2.0);
  179. }
  180. if(x == 2 || x == 3) {
  181. SetPlayerCheckpoint(playerid, 2156.5710, -2278.0015, 13.3228, 2.0);
  182. }
  183.  
  184. BuilderCP[playerid] = 2;
  185. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  186. }
  187. else if(BuilderCP[playerid] == 2)
  188. {
  189. DisablePlayerCheckpoint(playerid);
  190. RemovePlayerAttachedObject(playerid,0);
  191. ClearAnimations(playerid);
  192.  
  193. new x = random(3);
  194. if(x == 0) {
  195. SetPlayerCheckpoint(playerid, 2228.3660,-2251.5205,13.5547, 2.0);
  196. }
  197. if(x == 1) {
  198. SetPlayerCheckpoint(playerid, 2168.57, -2255.35, 13.03, 2.0);
  199. }
  200. if(x == 2 || x == 3) {
  201. SetPlayerCheckpoint(playerid, 2213.79, -2284.90, 15.15, 2.0);
  202. }
  203. SetPlayerSpecialAction(playerid, 0);
  204. BuilderCP[playerid] = 1;
  205.  
  206. new
  207. message[256],
  208. salar = 5000 + random(5000);
  209.  
  210. // format(message, sizeof(message), "~g~+$%d", salar);
  211. GameTextForPlayer(playerid, message, 2000, 1);
  212. GivePlayerMoney(playerid, salar);
  213. }
  214. return 1;
  215. }
  216.  
  217. public OnPlayerLeaveCheckpoint(playerid)
  218. {
  219. return 1;
  220. }
  221.  
  222. public OnPlayerEnterRaceCheckpoint(playerid)
  223. {
  224. return 1;
  225. }
  226.  
  227. public OnPlayerLeaveRaceCheckpoint(playerid)
  228. {
  229. return 1;
  230. }
  231.  
  232. public OnRconCommand(cmd[])
  233. {
  234. return 1;
  235. }
  236.  
  237. public OnPlayerRequestSpawn(playerid)
  238. {
  239. return 1;
  240. }
  241.  
  242. public OnObjectMoved(objectid)
  243. {
  244. return 1;
  245. }
  246.  
  247. public OnPlayerObjectMoved(playerid, objectid)
  248. {
  249. return 1;
  250. }
  251.  
  252. public OnPlayerPickUpPickup(playerid, pickupid)
  253. {
  254. return 1;
  255. }
  256.  
  257. public OnVehicleMod(playerid, vehicleid, componentid)
  258. {
  259. return 1;
  260. }
  261.  
  262. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  263. {
  264. return 1;
  265. }
  266.  
  267. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  268. {
  269. return 1;
  270. }
  271.  
  272. public OnPlayerSelectedMenuRow(playerid, row)
  273. {
  274. return 1;
  275. }
  276.  
  277. public OnPlayerExitedMenu(playerid)
  278. {
  279. return 1;
  280. }
  281.  
  282. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  283. {
  284. return 1;
  285. }
  286.  
  287. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  288. {
  289. return 1;
  290. }
  291.  
  292. public OnRconLoginAttempt(ip[], password[], success)
  293. {
  294. return 1;
  295. }
  296.  
  297. public OnPlayerUpdate(playerid)
  298. {
  299. if(!PlayerToPoint(75.0, playerid, 2201.0127,-2263.5964,29.9904) && Working[playerid] == 1)
  300. {
  301. Working[playerid] = 0;
  302. DisablePlayerCheckpoint(playerid);
  303. RemovePlayerAttachedObject(playerid,0);
  304. ClearAnimations(playerid);
  305. SetPlayerSpecialAction(playerid, 0);
  306. BuilderCP[playerid] = 0;
  307.  
  308. if(IsPlayerInAnyVehicle(playerid))
  309. {
  310. RemovePlayerFromVehicle(playerid);
  311. SendClientMessage(playerid, -1, "Ban da di ra khoi khu vuc cua cong viec.");
  312. }
  313. else
  314. {
  315. SendClientMessage(playerid, -1, "Ban da bi duoi viec.");
  316. }
  317. SetPlayerSkin(playerid, LastSkin[playerid]);
  318. }
  319. return 1;
  320. }
  321.  
  322. public OnPlayerStreamIn(playerid, forplayerid)
  323. {
  324. return 1;
  325. }
  326.  
  327. public OnPlayerStreamOut(playerid, forplayerid)
  328. {
  329. return 1;
  330. }
  331.  
  332. public OnVehicleStreamIn(vehicleid, forplayerid)
  333. {
  334. return 1;
  335. }
  336.  
  337. public OnVehicleStreamOut(vehicleid, forplayerid)
  338. {
  339. return 1;
  340. }
  341.  
  342. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  343. {
  344. return 1;
  345. }
  346.  
  347. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  348. {
  349. return 1;
  350. }
  351.  
  352. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  353. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  354. {
  355. if(IsPlayerConnected(playerid))
  356. {
  357. new Float:oldposx, Float:oldposy, Float:oldposz;
  358. new Float:tempposx, Float:tempposy, Float:tempposz;
  359. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  360. tempposx = (oldposx -x);
  361. tempposy = (oldposy -y);
  362. tempposz = (oldposz -z);
  363. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  364. {
  365. return 1;
  366. }
  367. }
  368. return 0;
  369. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement