HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <hamsandwich>
  6. #include <cstrike>
  7. #include <engine>
  8. #include <fun>
  9.  
  10.  
  11. #define PLUGIN "Admin Cheats with Menu"
  12. #define VERSION "1.2"
  13. #define AUTHOR "crazy"
  14.  
  15. #define ADMIN_JOG ADMIN_IMMUNITY
  16.  
  17. #define MAX_MENU_ITEM 14
  18.  
  19. new const elojel[] = "[Admin Csalas]"
  20.  
  21. new bool:restart_event = false
  22. new bool:onehit[33]
  23.  
  24. new lathatatlansag[33][2]
  25. new kameleon[33][2]
  26. new halkjaras[33][2]
  27.  
  28. new const admin_item_names[MAX_MENU_ITEM+1][] =
  29. {
  30. "",
  31. "\y255 HP & AP",
  32. "\yT-nek: \rAk47 \y| \yCT-nek: \rM4A1",
  33. "\yAWP Felszereles",
  34. "\yUjraeledes",
  35. "\y$16000",
  36. "\yGranat Felszereles",
  37. "\yFalonatjaras \r(Be/Ki)",
  38. "\yKor Ujrainditas \r60mp \ymulva",
  39. "\yHP Toltes Masodpercenkent",
  40. "\yLathatatlansag \r(Be/Felig/Ki)",
  41. "\yHalk Jaras \r(Be/Ki)",
  42. "\yT-nek: \rBomba (C4) \y| \yCT-nek: \rDefuse Kit",
  43. "\y1 hit = 1 kill",
  44. "\yKameleon \r(Ellenfel modellje)"
  45. }
  46.  
  47. public plugin_init() {
  48. register_plugin(PLUGIN, VERSION, AUTHOR)
  49.  
  50. register_dictionary( "admincsalas.txt")
  51.  
  52. register_cvar("irja_logba","1")
  53.  
  54. register_clcmd("say /admincsal","csalasmenu", ADMIN_JOG)
  55. register_clcmd("team_say /admincsal","csalasmenu", ADMIN_JOG)
  56. register_clcmd("adminmenu","csalasmenu", ADMIN_JOG)
  57.  
  58. RegisterHam(Ham_TakeDamage, "player", "fw_player_damage", 0)
  59. RegisterHam(Ham_Spawn, "player", "fw_player_spawn", 0)
  60. }
  61. public csalasmenu(id)
  62. {
  63. if(get_user_flags(id) & ADMIN_JOG)
  64. {
  65. static Item[64]
  66.  
  67. formatex(Item, charsmax(Item),"\r[Admin Csalas]\y Valassz!" )
  68. new Menu = menu_create(Item, "adminhandler")
  69.  
  70. new szTempid[10]
  71.  
  72. for(new i = 1; i<sizeof(admin_item_names); i++)
  73. {
  74. num_to_str(i, szTempid, 9)
  75. formatex(Item, charsmax(Item),admin_item_names[i])
  76. menu_additem(Menu, Item, szTempid)
  77. }
  78. menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
  79. menu_display(id, Menu)
  80.  
  81. }
  82. return PLUGIN_HANDLED
  83. }
  84. public adminhandler(id, menu, item)
  85. {
  86. if(get_user_flags(id) & ADMIN_JOG)
  87. {
  88. if( item == MENU_EXIT )
  89. {
  90. menu_destroy(menu)
  91. return PLUGIN_HANDLED
  92. }
  93. new data[6], iName[64]
  94. new access, callback
  95. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
  96.  
  97. new csapat[32], jatekos[32]
  98. get_user_team(id,csapat,32)
  99. get_user_name(id,jatekos,32)
  100. new key = str_to_num(data)
  101.  
  102. switch(key)
  103. {
  104. case 1:
  105. {
  106. if(is_user_alive(id))
  107. {
  108. set_user_armor(id, 255)
  109. set_user_health(id, 255)
  110. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HPAP_MSG")
  111.  
  112. if(get_cvar_num("irja_logba") == 1)
  113. log_amx("%s hasznalta az admin csalas: Elet & Pajzs funkciojat", jatekos)
  114. }
  115. else
  116. {
  117. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  118. }
  119. client_cmd(id,"adminmenu")
  120. }
  121. case 2:
  122. {
  123. if(is_user_alive(id))
  124. {
  125. strip_user_weapons(id)
  126.  
  127. if(equal(csapat,"T", 1))
  128. {
  129. give_item(id,"weapon_knife")
  130. give_item(id,"weapon_ak47")
  131. give_item(id,"ammo_762nato")
  132. give_item(id,"ammo_762nato")
  133. give_item(id,"ammo_762nato")
  134. give_item(id,"ammo_762nato")
  135. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"FEGYVEREK_TE")
  136.  
  137. if(get_cvar_num("irja_logba") == 1)
  138. log_amx("%s hasznalta az admin csalas: Fegyver(AK47) funkciojat", jatekos)
  139. }
  140. else
  141. {
  142. give_item(id,"weapon_knife")
  143. give_item(id,"weapon_m4a1")
  144. give_item(id,"ammo_556nato")
  145. give_item(id,"ammo_556nato")
  146. give_item(id,"ammo_556nato")
  147. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"FEGYVEREK_CT")
  148.  
  149. if(get_cvar_num("irja_logba") == 1)
  150. log_amx("%s hasznalta az admin csalas: Fegyver(M4a1) funkciojat", jatekos)
  151. }
  152. give_item(id,"weapon_deagle")
  153. give_item(id,"ammo_50ae")
  154. give_item(id,"ammo_50ae")
  155. give_item(id,"ammo_50ae")
  156. give_item(id,"ammo_50ae")
  157. give_item(id,"ammo_50ae")
  158. give_item(id,"ammo_50ae")
  159. give_item(id,"ammo_50ae")
  160. give_item(id,"weapon_hegrenade")
  161. give_item(id,"weapon_flashbang")
  162. give_item(id,"weapon_flashbang")
  163. give_item(id,"weapon_smokegrenade")
  164. }
  165. else
  166. {
  167. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  168. }
  169. client_cmd(id,"adminmenu")
  170. }
  171. case 3:
  172. {
  173. if(is_user_alive(id))
  174. {
  175. strip_user_weapons(id)
  176.  
  177. give_item(id,"weapon_knife")
  178. give_item(id,"weapon_awp")
  179. give_item(id,"ammo_338magnum")
  180. give_item(id,"ammo_338magnum")
  181. give_item(id,"ammo_338magnum")
  182. give_item(id,"weapon_deagle")
  183. give_item(id,"ammo_50ae")
  184. give_item(id,"ammo_50ae")
  185. give_item(id,"ammo_50ae")
  186. give_item(id,"ammo_50ae")
  187. give_item(id,"ammo_50ae")
  188. give_item(id,"ammo_50ae")
  189. give_item(id,"ammo_50ae")
  190. give_item(id,"weapon_hegrenade")
  191. give_item(id,"weapon_flashbang")
  192. give_item(id,"weapon_flashbang")
  193. give_item(id,"weapon_smokegrenade")
  194. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"AWP_MSG")
  195.  
  196. if(get_cvar_num("irja_logba") == 1)
  197. log_amx("%s hasznalta az admin csalas: Fegyver(AWP) funkciojat", jatekos)
  198. }
  199. else
  200. {
  201. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  202. }
  203. client_cmd(id,"adminmenu")
  204. }
  205. case 4:
  206. {
  207. {
  208. ExecuteHam(Ham_CS_RoundRespawn, id);
  209. set_user_armor(id, 100)
  210. set_user_godmode(id, 1)
  211. set_user_rendering(id, kRenderFxGlowShell, 0, 200, 0, kRenderNormal,30)
  212. set_task(5.0,"respawn", id)
  213. client_print(id, print_chat, "%s %L",jatekos, LANG_PLAYER,"UJRAELEDES_MSG")
  214.  
  215. if(get_cvar_num("irja_logba") == 1)
  216. log_amx("%s hasznalta az admin csalas: Ujraeledes funkciojat", jatekos)
  217.  
  218. }
  219. client_cmd(id,"adminmenu")
  220. }
  221. case 5:
  222. {
  223. if(is_user_alive(id))
  224. {
  225. new money = cs_get_user_money(id);
  226. if(money < 16000)
  227. {
  228. cs_set_user_money(id, 16000)
  229. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"PENZ_MSG")
  230.  
  231. if(get_cvar_num("irja_logba") == 1)
  232. log_amx("%s hasznalta az admin csalas: 16000 penz funkciojat", jatekos)
  233. }
  234. else
  235. {
  236. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"VANPENZ_MSG")
  237. }
  238. client_cmd(id,"adminmenu")
  239. }
  240. }
  241. case 6:
  242. {
  243. if(is_user_alive(id))
  244. {
  245. give_item(id, "weapon_hegrenade")
  246. give_item(id, "weapon_flashbang")
  247. give_item(id, "weapon_flashbang")
  248. give_item(id, "weapon_smokegrenade")
  249. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"GRANAT_MSG")
  250.  
  251. if(get_cvar_num("irja_logba") == 1)
  252. log_amx("%s hasznalta az admin csalas: Granat funkciojat", jatekos)
  253. }
  254. else
  255. {
  256. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  257. }
  258. client_cmd(id,"adminmenu")
  259. }
  260. case 7:
  261. {
  262. if(is_user_alive(id))
  263. {
  264. new szellem = get_user_noclip(id)
  265. if( szellem == 0 )
  266. {
  267. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"FALONATJARAS_BE_MSG")
  268. set_user_noclip(id, 1)
  269. }
  270. else
  271. {
  272. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"FALONATJARAS_KI_MSG")
  273. set_user_noclip(id, 0)
  274. }
  275.  
  276. if(get_cvar_num("irja_logba") == 1)
  277. log_amx("%s hasznalta az admin csalas: Falonatjaras funkciojat", jatekos)
  278. }
  279. else
  280. {
  281. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  282. }
  283. client_cmd(id,"adminmenu")
  284. }
  285. case 8:
  286. {
  287. if(is_user_alive(id))
  288. {
  289. if(restart_event == false)
  290. {
  291. restart_event = true
  292.  
  293. set_task(0.1, "restart", 60);
  294. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"UJRAINDITAS_MSG")
  295.  
  296. if(get_cvar_num("irja_logba") == 1)
  297. log_amx("%s hasznalta az admin csalas: kor ujrainditas funkciojat", jatekos)
  298. }
  299. else
  300. {
  301. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"MAR_MEGY_MSG")
  302. }
  303. client_cmd(id,"adminmenu")
  304. }
  305. }
  306. case 9:
  307. {
  308. if(is_user_alive(id))
  309. {
  310. new hp = get_user_health(id);
  311. if(hp < 100)
  312. {
  313. set_task(1.0,"hptolt", id)
  314. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HP_AD_MSG")
  315.  
  316. if(get_cvar_num("irja_logba") == 1)
  317. log_amx("%s hasznalta az admin csalas: +1HP/s funkciojat", jatekos)
  318. }
  319. else
  320. {
  321. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HP_FULL_MSG", hp)
  322. }
  323. }
  324. else
  325. {
  326. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  327. }
  328. client_cmd(id,"adminmenu")
  329. }
  330. case 10:
  331. {
  332. if(is_user_alive(id))
  333. {
  334. if(lathatatlansag[id][0] == 0)
  335.  
  336. {
  337. set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,3)
  338. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"TELJES_LATHATATLAN_MSG")
  339. lathatatlansag[id][0] = 1;
  340. }
  341. else if(lathatatlansag[id][0] == 1)
  342. {
  343. set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,50)
  344. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"LATHATATLAN_MSG")
  345. lathatatlansag[id][0] = 2;
  346. }
  347. else if(lathatatlansag[id][0] == 2)
  348. {
  349. set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16)
  350. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"LATHATATLAN_KI_MSG")
  351. lathatatlansag[id][0] = 0;
  352. }
  353. if(get_cvar_num("irja_logba") == 1)
  354. log_amx("%s hasznalta az admin csalas: Lathatatlansag funkciojat", jatekos)
  355. }
  356. else
  357. {
  358. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  359. }
  360. client_cmd(id,"adminmenu")
  361. }
  362. case 11:
  363. {
  364. if(is_user_alive(id))
  365. {
  366. if(halkjaras[id][0] == 0)
  367. {
  368. set_user_footsteps(id, 1);
  369. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALKJARAS_BE_MSG")
  370. halkjaras[id][0] = 1;
  371. }
  372. else
  373. {
  374. set_user_footsteps(id, 0)
  375. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALKJARAS_KI_MSG")
  376. halkjaras[id][0] = 0
  377. }
  378. if(get_cvar_num("irja_logba") == 1)
  379. log_amx("%s hasznalta az admin csalas: HalkJaras funkciojat", jatekos)
  380. }
  381. else
  382. {
  383. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  384. }
  385. client_cmd(id,"adminmenu")
  386. }
  387. case 12:
  388. {
  389. if(is_user_alive(id))
  390. {
  391. if(equal(csapat,"T", 1))
  392. {
  393. give_item(id,"weapon_c4")
  394. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"C4_MSG")
  395.  
  396. if(get_cvar_num("irja_logba") == 1)
  397. log_amx("%s hasznalta az admin csalas: Bomba funkciojat", jatekos)
  398. }
  399. else
  400. {
  401. cs_set_user_defuse(id)
  402. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HATASTALANITO_MSG")
  403.  
  404. if(get_cvar_num("irja_logba") == 1)
  405. log_amx("%s hasznalta az admin csalas: Hatastalanito funkciojat", jatekos)
  406. }
  407. }
  408. else
  409. {
  410. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  411. }
  412. client_cmd(id,"adminmenu")
  413. }
  414. case 13:
  415. {
  416. if(is_user_alive(id))
  417. {
  418. onehit[id] = true
  419. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"ONEHIT_MSG")
  420.  
  421. if(get_cvar_num("irja_logba") == 1)
  422. log_amx("%s hasznalta az admin csalas: 1 lovesbol oles funkciojat", jatekos)
  423.  
  424. else
  425. {
  426. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  427. }
  428. client_cmd(id,"adminmenu")
  429. }
  430. }
  431. case 14:
  432. {
  433. if(is_user_alive(id))
  434. {
  435. if(kameleon[id][0] == 0)
  436. {
  437. if(equal(csapat,"T", 1))
  438. {
  439.  
  440. cs_set_user_model(id, "gign")
  441. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"KAMELEON_MSG")
  442.  
  443. if(get_cvar_num("irja_logba") == 1)
  444. log_amx("%s hasznalta az admin csalas: Kameleon(CT) funkciojat", jatekos)
  445.  
  446. }
  447. else
  448. {
  449. cs_set_user_model(id, "leet")
  450. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"KAMELEON_MSG")
  451.  
  452. if(get_cvar_num("irja_logba") == 1)
  453. log_amx("%s hasznalta az admin csalas: Kameleon(TE) funkciojat", jatekos)
  454. }
  455.  
  456. kameleon[id][0] = 1
  457. }
  458. else
  459. {
  460. cs_reset_user_model(id)
  461. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"KAMELEON_KI_MSG")
  462. kameleon[id][0] = 0
  463. }
  464. }
  465. else
  466. {
  467. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HALOTT_MSG")
  468. }
  469. client_cmd(id,"adminmenu")
  470. }
  471. }
  472. }
  473. menu_destroy(menu)
  474. return PLUGIN_HANDLED
  475. }
  476. public respawn(id)
  477. {
  478. set_user_godmode(id, 0)
  479. set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16)
  480.  
  481. return PLUGIN_CONTINUE
  482. }
  483.  
  484. public hptolt(id)
  485. {
  486. new hp = get_user_health(id)
  487.  
  488. if(hp < 100)
  489. {
  490. set_user_health(id, hp + 1)
  491. set_task(1.0,"hptolt", id)
  492. }
  493. else
  494. {
  495. client_print(id, print_chat, "%s %L",elojel, LANG_PLAYER,"HP_TELE_MSG", hp)
  496. return PLUGIN_HANDLED;
  497. }
  498.  
  499. return PLUGIN_CONTINUE;
  500. }
  501. public restart(count)
  502. {
  503. set_hudmessage(_, _, _, -1.0, 0.6, 1)
  504. show_hudmessage(0,"A kor ujra lesz inditva %d masodperc mulva...", count)
  505.  
  506. if((count <= 10) || (count % 10 == 0))
  507. {
  508. new szNum[32]
  509. num_to_word(count, szNum, 31)
  510. client_cmd(0, "spk ^"fvox/%s^"", szNum)
  511. }
  512.  
  513. count--;
  514.  
  515. if(count != 0)
  516. {
  517. set_task(1.0, "restart", count)
  518. }
  519. else
  520. {
  521. set_hudmessage(_, _, _, -1.0, 0.6, 2)
  522. show_hudmessage(0,">> Kor Ujrainditas <<")
  523.  
  524. server_cmd("sv_restart 1")
  525.  
  526. restart_event = false
  527. }
  528. return PLUGIN_CONTINUE
  529. }
  530. public fw_player_damage(victim, inflictor, attacker, Float:damage, damage_type)
  531. {
  532. if(onehit[attacker])
  533. {
  534. SetHamParamFloat(4, float(get_user_health(victim)+1))
  535. }
  536. return HAM_IGNORED
  537. }
  538. public fw_player_spawn(id)
  539. {
  540. lathatatlansag[id][0] = 0
  541. halkjaras[id][0] = 0
  542. kameleon[id][0] = 0
  543. onehit[id] = false
  544. }
  545. public client_putinserver(id)
  546. {
  547. if(is_user_bot(id))
  548. return PLUGIN_HANDLED
  549.  
  550. lathatatlansag[id][0] = 0
  551. halkjaras[id][0] = 0
  552. kameleon[id][0] = 0
  553. onehit[id] = false
  554.  
  555. set_user_rendering(id,kRenderFxNone,255,255,255, kRenderNormal,16)
  556.  
  557. return PLUGIN_CONTINUE;
  558. }
  559.  
  560. public client_disconnect(id)
  561. {
  562. if(is_user_bot(id))
  563. return PLUGIN_HANDLED
  564.  
  565. lathatatlansag[id][0] = 0
  566. halkjaras[id][0] = 0
  567. kameleon[id][0] = 0
  568. onehit[id] = false
  569.  
  570. return PLUGIN_CONTINUE
  571. }
  572.