Kucin666

Hacker Job

Jan 2nd, 2016
1,996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.58 KB | None | 0 0
  1. #include <a_samp>
  2. #include <streamer>
  3. #include <zcmd>
  4.  
  5. #define FILTERSCRIPT
  6.  
  7. new HackerJob[MAX_PLAYERS];
  8. new HJLimitTimer;
  9.  
  10. forward HJTimeLimit(playerid);
  11. public HJTimeLimit(playerid)
  12. {
  13. SpawnPlayer(playerid);
  14. ShowPlayerDialog(playerid,-1,0,"","","","");
  15. SetPlayerVirtualWorld(playerid, 0);
  16. SetPlayerInterior(playerid,0);
  17. HackerJob[playerid] = 0;
  18. SendClientMessage(playerid,0xFF0000AA,"* Working time you're done, and you dont finish it.");
  19. return 1;
  20. }
  21. forward HackerSetup(playerid);
  22. public HackerSetup(playerid)
  23. {
  24. SetPlayerVirtualWorld(playerid, playerid+1);
  25. SetPlayerInterior(playerid,1);
  26. SetPlayerPos(playerid, 2164.7,1601.9,999.9);
  27. SetPlayerFacingAngle(playerid, 263.0);
  28. SetPlayerCameraPos(playerid, 2163.5,1601.9,1000.8);
  29. SetPlayerCameraLookAt(playerid, 2172.7,1601.9,999.9);
  30. ApplyAnimation(playerid,"INT_OFFICE","OFF_Sit_Type_Loop", 4.0, 1, 0, 0, 0, 0);
  31. SetTimerEx("HackerOne", 3000, 0, "d", playerid);
  32. }
  33.  
  34. forward HackerOne(playerid);
  35. public HackerOne(playerid)
  36. {
  37. PlayerPlaySound( playerid, 1058, 0, 0, 0 );
  38. SetPlayerCameraLookAt(playerid, 2172.1,1601.7,999.9);
  39. ShowPlayerDialog(playerid, 1998, DIALOG_STYLE_INPUT, "root@localhost:~", "Login as: root\nSystem is ready to rip off an important center\nType began to launch attacks", "Submit", "Cancel");
  40. }
  41.  
  42. forward HackerTwo(playerid);
  43. public HackerTwo(playerid)
  44. {
  45. PlayerPlaySound( playerid, 1058, 0, 0, 0 );
  46. ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
  47. GameTextForPlayer(playerid,"~p~succeed",1000,6);
  48. ShowPlayerDialog(playerid, 1999, DIALOG_STYLE_INPUT, "root@localhost:~", "Login as: root\nThe system continues to the next center\nType keygen to launch attacks", "Submit", "Cancel");
  49. }
  50.  
  51. forward HackerThree(playerid);
  52. public HackerThree(playerid)
  53. {
  54. PlayerPlaySound( playerid, 1058, 0, 0, 0 );
  55. GameTextForPlayer(playerid,"~p~succeed",1000,6);
  56. ShowPlayerDialog(playerid, 2000, DIALOG_STYLE_INPUT, "root@localhost:~", "Login as: root\nThe system continues to the next center\nType cracked to launch attacks", "Submit", "Cancel");
  57. }
  58. forward HackerFour(playerid);
  59. public HackerFour(playerid)
  60. {
  61. PlayerPlaySound( playerid, 1058, 0, 0, 0 );
  62. GameTextForPlayer(playerid,"~p~succeed",1000,6);
  63. ShowPlayerDialog(playerid, 2001, DIALOG_STYLE_INPUT, "root@localhost:~", "Login as: root\nThe system continues to the next center\nType worm to launch attacks", "Submit", "Cancel");
  64. }
  65. forward HackerFive(playerid);
  66. public HackerFive(playerid)
  67. {
  68. PlayerPlaySound( playerid, 1058, 0, 0, 0 );
  69. GameTextForPlayer(playerid,"~p~succeed",1000,6);
  70. ShowPlayerDialog(playerid, 2002, DIALOG_STYLE_INPUT, "root@localhost:~", "Login as: root\nThe system continues to the next center\nType virus to launch attacks", "Submit", "Cancel");
  71. }
  72.  
  73. forward HackerSix(playerid);
  74. public HackerSix(playerid)
  75. {
  76. PlayerPlaySound( playerid, 1058, 0, 0, 0 );
  77. GameTextForPlayer(playerid,"~p~succeed",1000,6);
  78. ShowPlayerDialog(playerid, 2003, DIALOG_STYLE_INPUT, "root@localhost:~", "Login as: root\nThe system continues to the next center\nType trojan to launch attacks", "Submit", "Cancel");
  79. }
  80.  
  81. forward HackerSeven(playerid);
  82. public HackerSeven(playerid)
  83. {
  84. KillTimer(HJLimitTimer);
  85. PlayerPlaySound( playerid, 1058, 0, 0, 0 );
  86. SetPlayerVirtualWorld(playerid, playerid+1);
  87. SetPlayerInterior(playerid,1);
  88. SetPlayerPos(playerid, 2164.7,1601.9,999.9);
  89. SetPlayerFacingAngle(playerid, 263.0);
  90. SetPlayerCameraPos(playerid, 2163.5,1601.9,1000.8);
  91. SetPlayerCameraLookAt(playerid, 2172.7,1601.9,999.9);
  92. ApplyAnimation(playerid,"CASINO","Roulette_win", 4.0, 1, 0, 0, 0, 0);
  93. GameTextForPlayer(playerid,"~p~succeed",2000,6);
  94. new hname[MAX_PLAYER_NAME], string[128];
  95. GetPlayerName(playerid, hname, sizeof(hname));
  96. format(string, sizeof(string), "%s have completed the job as a Hacker Job.", hname );
  97. SendClientMessageToAll(0x33FF33AA, string);
  98. SendClientMessage(playerid,0x33FF33AA,"* You have completed the job and get $110000");
  99. GivePlayerMoney(playerid, 110000);
  100. SetTimerEx("HackerSuccesed", 3000, 0, "d", playerid);
  101.  
  102. }
  103.  
  104. forward HackerSuccesed(playerid);
  105. public HackerSuccesed(playerid)
  106. {
  107. SpawnPlayer(playerid);
  108. SetPlayerVirtualWorld(playerid, 0);
  109. TogglePlayerControllable(playerid,true);
  110. HackerJob[playerid] = 0;
  111. SetPlayerInterior(playerid,0);
  112. return 1;
  113. }
  114.  
  115. public OnFilterScriptInit()
  116. {
  117. print("+code++++++@!^*%$#~++worm++++cracked++++");
  118. print(" Hacker Job - Kucin666 ");
  119. print("+++++++trojan+++*********++++hack+++++++\n");
  120.  
  121. CreatePickup(1239, 1, 1720.3076,-1740.8135,13.5469);
  122. CreateDynamicMapIcon(1720.3076,-1740.8135,13.5469, 23, 0);
  123. Create3DTextLabel("Hacker Job",0xEEEE88FF,1720.3076,-1740.8135,13.5469 +0.85,20.0,0,1);
  124. Create3DTextLabel("Type /hacker",0xEEEE88FF,1720.3076,-1740.8135,13.5469 +0.75,20.0,0,1);
  125. return 1;
  126. }
  127.  
  128. public OnPlayerConnect(playerid)
  129. {
  130. HackerJob[playerid] = 0;
  131. return 1;
  132. }
  133.  
  134. public OnPlayerDisconnect(playerid,reason)
  135. {
  136. KillTimer(HJLimitTimer);
  137. HackerJob[playerid] = 0;
  138. return 1;
  139. }
  140.  
  141. public OnPlayerDeath(playerid, killerid, reason)
  142. {
  143. KillTimer(HJLimitTimer);
  144. HackerJob[playerid] = 0;
  145. return 1;
  146. }
  147.  
  148.  
  149. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  150. {
  151. if(HackerJob[playerid] == 1)
  152. {
  153. if(!response)
  154. {
  155. SpawnPlayer(playerid);
  156. KillTimer(HJLimitTimer);
  157. ShowPlayerDialog(playerid,-1,0,"","","","");
  158. SetPlayerVirtualWorld(playerid, 0);
  159. SetPlayerInterior(playerid,0);
  160. HackerJob[playerid] = 0;
  161. SendClientMessage(playerid, 0xFF0000AA, "You have failed to do the hacks.");
  162. return 1;
  163. }
  164. if(dialogid == 1998)
  165. {
  166. if(strfind(inputtext,"began") != -1)
  167. {
  168. SetPlayerVirtualWorld(playerid, playerid+1);
  169. SetPlayerInterior(playerid,2);
  170. SetPlayerPos(playerid, 2549.7 +2,-1297.8,1060.9);
  171. SetPlayerFacingAngle(playerid, 92.0);
  172. SetPlayerCameraPos(playerid, 2551.4,-1297.8,1062.1);
  173. SetPlayerCameraLookAt(playerid, 2549.7,-1297.8,1061);
  174. TogglePlayerControllable(playerid,false);
  175. GameTextForPlayer(playerid,"~p~rip off...",6000,6);
  176. return SetTimerEx("HackerTwo", 6000, 0, "d", playerid);
  177. }
  178. else
  179. {
  180. SpawnPlayer(playerid);
  181. KillTimer(HJLimitTimer);
  182. ShowPlayerDialog(playerid,-1,0,"","","","");
  183. SetPlayerVirtualWorld(playerid, 0);
  184. SetPlayerInterior(playerid,0);
  185. HackerJob[playerid] = 0;
  186. SendClientMessage(playerid, 0xFF0000AA, "You have failed to do the hacks.");
  187. return 1;
  188. }
  189. }
  190. if(dialogid == 1999)
  191. {
  192. if(strfind(inputtext,"keygen") != -1)
  193. {
  194. SetPlayerVirtualWorld(playerid, playerid+1);
  195. SetPlayerInterior(playerid,3);
  196. SetPlayerPos(playerid, 830.7 +2,-0.2,1004.1);
  197. SetPlayerFacingAngle(playerid, 178.9);
  198. SetPlayerCameraPos(playerid, 830.7,0.3,1005.2);
  199. SetPlayerCameraLookAt(playerid, 830.7,-0.2,1004.8);
  200. TogglePlayerControllable(playerid,false);
  201. GameTextForPlayer(playerid,"~p~rip off...",6000,6);
  202. return SetTimerEx("HackerThree", 6000, 0, "d", playerid);
  203. }
  204. else
  205. {
  206. SpawnPlayer(playerid);
  207. KillTimer(HJLimitTimer);
  208. ShowPlayerDialog(playerid,-1,0,"","","","");
  209. SetPlayerVirtualWorld(playerid, 0);
  210. SetPlayerInterior(playerid,0);
  211. HackerJob[playerid] = 0;
  212. SendClientMessage(playerid, 0xFF0000AA, "You have failed to do the hacks.");
  213. return 1;
  214. }
  215. }
  216. if(dialogid == 2000)
  217. {
  218. if(strfind(inputtext,"cracked") != -1)
  219. {
  220. SetPlayerVirtualWorld(playerid, playerid+1);
  221. SetPlayerInterior(playerid,6);
  222. SetPlayerPos(playerid, 231.6 +2,80.3,1005.0);
  223. SetPlayerFacingAngle(playerid, 46.3);
  224. SetPlayerCameraPos(playerid, 232.7,79.4,1005.6);
  225. SetPlayerCameraLookAt(playerid, 231.6,80.3,1005.0);
  226. TogglePlayerControllable(playerid,false);
  227. GameTextForPlayer(playerid,"~p~rip off...",6000,6);
  228. return SetTimerEx("HackerFour", 6000, 0, "d", playerid);
  229. }
  230. else
  231. {
  232. SpawnPlayer(playerid);
  233. KillTimer(HJLimitTimer);
  234. ShowPlayerDialog(playerid,-1,0,"","","","");
  235. SetPlayerVirtualWorld(playerid, 0);
  236. SetPlayerInterior(playerid,0);
  237. HackerJob[playerid] = 0;
  238. SendClientMessage(playerid, 0xFF0000AA, "You have failed to do the hacks.");
  239. return 1;
  240. }
  241. }
  242. if(dialogid == 2001)
  243. {
  244. if(strfind(inputtext,"worm") != -1)
  245. {
  246. SetPlayerVirtualWorld(playerid, playerid+1);
  247. SetPlayerInterior(playerid,2);
  248. SetPlayerPos(playerid, 2572.1 -2,-1291.3,1037.7);
  249. SetPlayerFacingAngle(playerid, 276.5);
  250. SetPlayerCameraPos(playerid, 2571.3,-1291.3,1038.3);
  251. SetPlayerCameraLookAt(playerid, 2572.1,-1291.3,1038.4);
  252. TogglePlayerControllable(playerid,false);
  253. GameTextForPlayer(playerid,"~p~rip off...",6000,6);
  254. return SetTimerEx("HackerFive", 6000, 0, "d", playerid);
  255. }
  256. else
  257. {
  258. SpawnPlayer(playerid);
  259. KillTimer(HJLimitTimer);
  260. ShowPlayerDialog(playerid,-1,0,"","","","");
  261. SetPlayerVirtualWorld(playerid, 0);
  262. SetPlayerInterior(playerid,0);
  263. HackerJob[playerid] = 0;
  264. SendClientMessage(playerid, 0xFF0000AA, "You have failed to do the hacks.");
  265. return 1;
  266. }
  267. }
  268. if(dialogid == 2002)
  269. {
  270. if(strfind(inputtext,"virus") != -1)
  271. {
  272. SetPlayerVirtualWorld(playerid, playerid+1);
  273. SetPlayerInterior(playerid,2);
  274. SetPlayerPos(playerid, 2568.3 -3,-1294.6,1037.7);
  275. SetPlayerFacingAngle(playerid, 207.0);
  276. SetPlayerCameraPos(playerid, 2568.0,-1293.7,1038.6);
  277. SetPlayerCameraLookAt(playerid, 2568.8,-1294.6,1038.3);
  278. TogglePlayerControllable(playerid,false);
  279. GameTextForPlayer(playerid,"~p~rip off...",6000,6);
  280. return SetTimerEx("HackerSix", 6000, 0, "d", playerid);
  281. }
  282. else
  283. {
  284. SpawnPlayer(playerid);
  285. KillTimer(HJLimitTimer);
  286. ShowPlayerDialog(playerid,-1,0,"","","","");
  287. SetPlayerVirtualWorld(playerid, 0);
  288. SetPlayerInterior(playerid,0);
  289. HackerJob[playerid] = 0;
  290. SendClientMessage(playerid, 0xFF0000AA, "You have failed to do the hacks.");
  291. return 1;
  292. }
  293. }
  294. if(dialogid == 2003)
  295. {
  296. for(new i = 0; i < strlen(inputtext); i++)
  297. {
  298. if(strfind(inputtext,"trojan") != -1)
  299. {
  300. SetPlayerVirtualWorld(playerid, playerid+1);
  301. SetPlayerInterior(playerid,0);
  302. SetPlayerPos(playerid, 212.4 +10,1822.9,6.4);
  303. SetPlayerFacingAngle(playerid, 89.7);
  304. SetPlayerCameraPos(playerid, 216.4,1823.1,7.8);
  305. SetPlayerCameraLookAt(playerid, 212.4,1822.9,6.4);
  306. TogglePlayerControllable(playerid,false);
  307. GameTextForPlayer(playerid,"~p~rip off...",6000,6);
  308. return SetTimerEx("HackerSeven", 6000, 0, "d", playerid);
  309. }
  310. else
  311. {
  312. SpawnPlayer(playerid);
  313. KillTimer(HJLimitTimer);
  314. ShowPlayerDialog(playerid,-1,0,"","","","");
  315. SetPlayerVirtualWorld(playerid, 0);
  316. SetPlayerInterior(playerid,0);
  317. HackerJob[playerid] = 0;
  318. SendClientMessage(playerid, 0xFF0000AA, "You have failed to do the hacks.");
  319. return 1;
  320. }
  321. }
  322. }
  323. }
  324. return 1;
  325. }
  326.  
  327. CMD:jobhacker(playerid, params[])
  328. {
  329. if(HackerJob[playerid] == 1)
  330. {
  331. SendClientMessage(playerid, 0xFF0000AA, "You're not allowed to use this command while working.");
  332. return 1;
  333. }
  334. SetPlayerPos(playerid,1719.8445,-1733.5785,13.3828);
  335. SetPlayerInterior(playerid,0);
  336. return 1;
  337. }
  338.  
  339. CMD:hacker(playerid, params[])
  340. {
  341. if(IsPlayerInRangeOfPoint(playerid, 2, 1720.3076,-1740.8135,13.5469))
  342. {
  343. if(HackerJob[playerid] > 0)
  344. {
  345. SendClientMessage(playerid,0xFF0000AA,"You have started a Hacker Job and can't use this command.");
  346. return 1;
  347. }
  348. HackerJob[playerid] = 1;
  349. new hname[MAX_PLAYER_NAME], string[128];
  350. GetPlayerName(playerid, hname, sizeof(hname));
  351. format(string, sizeof(string), "%s was working as a Hacker. Type /jobhacker for go to Hacker Job.", hname );
  352. SendClientMessageToAll(0xFFFF00AA, string);
  353. HJLimitTimer = SetTimerEx("HJTimeLimit", 300000, 0, "d", playerid);
  354. HackerSetup(playerid);
  355. return 1;
  356. }
  357. else
  358. {
  359. SendClientMessage(playerid, 0xFF0000AA, "You must be at work Hacker to use this command.");
  360. }
  361. return 1;
  362. }
Add Comment
Please, Sign In to add comment