hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.27. 08:28



Jelenlévő felhasználók

Jelenleg 548 felhasználó van jelen :: 0 regisztrált, 0 rejtett és 548 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: nincs regisztrált felhasználó az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 5 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Sokkoló 100sebzes
HozzászólásElküldve: 2013.03.08. 16:13 
Offline
Fanatikus
Avatar

Csatlakozott: 2012.11.02. 17:32
Hozzászólások: 182
Megköszönt másnak: 15 alkalommal
Megköszönték neki: 4 alkalommal
Sziasztok...
Nekem egy olyan plugin kellene JB-re (JailBreak) ,hogy ct nek Sokkoló fegyvere lenne ami 100 at sebez...
Előre is köszönöm :) ;) |Tetszik| :shock: ;)


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Sokkoló 100sebzes
HozzászólásElküldve: 2013.03.08. 16:18 
Offline
Őstag

Csatlakozott: 2013.01.27. 17:48
Hozzászólások: 1247
Megköszönt másnak: 6 alkalommal
Megköszönték neki: 61 alkalommal
ugye a jailbreak szeródon bennt van a shop nem??? akkor azt a plugint kell átírni mert abban van a sokkoló sebzése!

_________________
banned user


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Sokkoló 100sebzes
HozzászólásElküldve: 2013.03.08. 16:25 
Offline
Fanatikus
Avatar

Csatlakozott: 2012.11.02. 17:32
Hozzászólások: 182
Megköszönt másnak: 15 alkalommal
Megköszönték neki: 4 alkalommal
JoGoBeLLa írta:
ugye a jailbreak szeródon bennt van a shop nem??? akkor azt a plugint kell átírni mert abban van a sokkoló sebzése!


Most rendeltem a szervert ,de már igen benntvan hát ha átkell írni akkor azt kellene megcsinálni ;) :shock:


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Sokkoló 100sebzes
HozzászólásElküldve: 2013.03.08. 18:53 
Offline
Őstag

Csatlakozott: 2013.01.27. 17:48
Hozzászólások: 1247
Megköszönt másnak: 6 alkalommal
Megköszönték neki: 61 alkalommal
itt van!:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5. #include <fakemeta>
  6. #include <fun>
  7.  
  8. #define is_valid_player(%1) (1 <= %1 <= 32)
  9.  
  10. /*============================================================
  11. Variables
  12. ============================================================*/
  13.  
  14. new
  15. OnOff,
  16. OnOff2,
  17. precio1,
  18. precio2,
  19. precio3,
  20. precio4,
  21. precio5,
  22. precio6,
  23. precio7,
  24. precioC1,
  25. precioC2,
  26. precioC3,
  27. precioC4,
  28. CTDefaultDano,
  29. TDefaultDano,
  30. PaloDano,
  31. HachaDano,
  32. MacheteDano,
  33. MotocierraDano,
  34. hTDefaultDano,
  35. hCTDefaultDano,
  36. hPaloDano,
  37. hHachaDano,
  38. hMacheteDano,
  39. Vida,
  40. Armor,
  41. glock1,
  42. glock2,
  43. help,
  44. g_killjp,
  45. g_killhsjp,
  46. g_startjp,
  47. g_maxjp,
  48. g_iMsgSayText,
  49. syncObj,
  50. Ronda[33],
  51. Speed[33],
  52. Speed2[33],
  53. TCuchillo[33],
  54. CTCuchillo[33],
  55. Destapador[33],
  56. Hacha[33],
  57. Machete[33],
  58. Motocierra[33],
  59. g_jbpacks[33],
  60. quitar[33],
  61. regalar[33],
  62. gidPlayer[33]
  63.  
  64.  
  65. /*============================================================
  66. Weapon Model's
  67. ============================================================*/
  68.  
  69.  
  70. new VIEW_MODELT[] = "models/jailbreak_shop/v_rabkez.mdl"
  71. new PLAYER_MODELT[] = "models/jailbreak_shop/p_rabkez.mdl"
  72.  
  73. new VIEW_MODELCT[] = "models/jailbreak_shop/v_sokkolo.mdl"
  74. new PLAYER_MODELCT[] = "models/jailbreak_shop/p_sokkolo.mdl"
  75.  
  76. new VIEW_Hacha[] = "models/jailbreak_shop/v_tortalapat.mdl"
  77. new PLAYER_Hacha[] = "models/jailbreak_shop/p_tortalapat.mdl"
  78.  
  79. new VIEW_Machete[] = "models/jailbreak_shop/v_fejsze.mdl"
  80. new PLAYER_Machete[] = "models/jailbreak_shop/p_fejsze.mdl"
  81.  
  82. new VIEW_Palo[] = "models/jailbreak_shop/v_wcpumpa.mdl"
  83. new PLAYER_Palo[] = "models/jailbreak_shop/p_wcpumpa.mdl"
  84.  
  85. new VIEW_Moto[] = "models/jailbreak_shop/v_lancfuresz.mdl"
  86. new PLAYER_Moto[] = "models/jailbreak_shop/p_lancfuresz.mdl"
  87.  
  88. new WORLD_MODEL[] = "models/w_knife.mdl"
  89. new OLDWORLD_MODEL[] = "models/w_knife.mdl"
  90.  
  91. /*============================================================
  92.   Shop Sounds!
  93. ============================================================*/
  94. new const Si[] = { "jailbreak_shop/Yes.wav" }
  95. new const No[] = { "jailbreak_shop/No.wav" }
  96.  
  97. /*============================================================
  98.   Weapon Sound's
  99. ============================================================*/
  100.  
  101. new const palo_deploy[] = { "weapons/knife_deploy1.wav" }
  102. new const palo_slash1[] = { "weapons/knife_slash1.wav" }
  103. new const palo_slash2[] = { "weapons/knife_slash2.wav" }
  104. new const palo_wall[] = { "jailbreak_shop/Palo/PHitWall.wav" }
  105. new const palo_hit1[] = { "jailbreak_shop/Palo/PHit1.wav" }
  106. new const palo_hit2[] = { "jailbreak_shop/Palo/PHit2.wav" }
  107. new const palo_hit3[] = { "jailbreak_shop/Palo/PHit3.wav" }
  108. new const palo_hit4[] = { "jailbreak_shop/Palo/PHit4.wav" }
  109. new const palo_stab[] = { "jailbreak_shop/Palo/PStab.wav" }
  110.  
  111. new const hacha_deploy[] = { "weapons/knife_deploy1.wav" }
  112. new const hacha_slash1[] = { "jailbreak_shop/Hacha/HSlash1.wav" }
  113. new const hacha_slash2[] = { "jailbreak_shop/Hacha/HSlash2.wav" }
  114. new const hacha_wall[] = { "jailbreak_shop/Hacha/HHitWall.wav" }
  115. new const hacha_hit1[] = { "jailbreak_shop/Hacha/HHit1.wav" }
  116. new const hacha_hit2[] = { "jailbreak_shop/Hacha/HHit2.wav" }
  117. new const hacha_hit3[] = { "jailbreak_shop/Hacha/HHit3.wav" }
  118. new const hacha_stab[] = { "jailbreak_shop/Hacha/HHit4.wav" }
  119.  
  120. new const machete_deploy[] = { "jailbreak_shop/Machete/MConvoca.wav" }
  121. new const machete_slash1[] = { "jailbreak_shop/Machete/MSlash1.wav" }
  122. new const machete_slash2[] = { "jailbreak_shop/Machete/MSlash2.wav" }
  123. new const machete_wall[] = { "jailbreak_shop/Machete/MHitWall.wav" }
  124. new const machete_hit1[] = { "jailbreak_shop/Machete/MHit1.wav" }
  125. new const machete_hit2[] = { "jailbreak_shop/Machete/MHit2.wav" }
  126. new const machete_hit3[] = { "jailbreak_shop/Machete/MHit3.wav" }
  127. new const machete_hit4[] = { "jailbreak_shop/Machete/MHit4.wav" }
  128. new const machete_stab[] = { "jailbreak_shop/Machete/MStab.wav" }
  129.  
  130. new const motocierra_deploy[] = { "jailbreak_shop/Moto/MTConvoca.wav", }
  131. new const motocierra_slash[] = { "jailbreak_shop/Moto/MTSlash.wav", }
  132. new const motocierra_wall[] = { "jailbreak_shop/Moto/MTHitWall.wav" }
  133. new const motocierra_hit1[] = { "jailbreak_shop/Moto/MTHit1.wav", }
  134. new const motocierra_hit2[] = { "jailbreak_shop/Moto/MTHit2.wav", }
  135. new const motocierra_stab[] = { "jailbreak_shop/Moto/MTStab.wav" }
  136.  
  137. new const t_deploy[] = { "jailbreak_shop/T/TConvoca.wav", }
  138. new const t_slash1[] = { "jailbreak_shop/T/Slash1.wav", }
  139. new const t_slash2[] = { "jailbreak_shop/T/Slash2.wav", }
  140. new const t_wall[] = { "jailbreak_shop/T/THitWall.wav" }
  141. new const t_hit1[] = { "jailbreak_shop/T/THit1.wav", }
  142. new const t_hit2[] = { "jailbreak_shop/T/THit2.wav", }
  143. new const t_hit3[] = { "jailbreak_shop/T/THit3.wav", }
  144. new const t_hit4[] = { "jailbreak_shop/T/THit4.wav", }
  145. new const t_stab[] = { "jailbreak_shop/T/TStab.wav" }
  146.  
  147. new const ct_deploy[] = { "jailbreak_shop/CT/CTConvoca.wav", }
  148. new const ct_slash1[] = { "jailbreak_shop/CT/Slash1.wav", }
  149. new const ct_slash2[] = { "jailbreak_shop/CT/Slash2.wav", }
  150. new const ct_wall[] = { "jailbreak_shop/CT/CTHitWall.wav" }
  151. new const ct_hit1[] = { "jailbreak_shop/CT/CTHit1.wav", }
  152. new const ct_hit2[] = { "jailbreak_shop/CT/CTHit2.wav", }
  153. new const ct_hit3[] = { "jailbreak_shop/CT/CTHit3.wav", }
  154. new const ct_hit4[] = { "jailbreak_shop/CT/CTHit4.wav", }
  155. new const ct_stab[] = { "jailbreak_shop/CT/CTStab.wav" }
  156.  
  157.  
  158. /*============================================================
  159. Config
  160. ============================================================*/
  161.  
  162. public plugin_init()
  163. {
  164.  
  165. register_plugin("[JB] Shop", "2.9", "[M]aNuC[s]_")
  166.  
  167. register_clcmd("say /bolt", "Tienda")
  168. register_clcmd("say !bolt", "Tienda")
  169. register_clcmd("say_team /bolt", "Tienda")
  170. register_clcmd("say_team !bolt", "Tienda")
  171.  
  172. register_clcmd("say /mg", "duel_menu", ADMIN_ALL)
  173. register_clcmd("say !mg", "duel_menu", ADMIN_ALL)
  174. register_clcmd("say_team /mg", "duel_menu", ADMIN_ALL)
  175. register_clcmd("say_team !mg", "duel_menu", ADMIN_ALL)
  176. register_clcmd("JailBreak Pontok", "player")
  177.  
  178. RegisterHam(Ham_Spawn, "player", "Fwd_PlayerSpawn_Post", 1)
  179. RegisterHam(Ham_TakeDamage, "player", "FwdTakeDamage", 0)
  180. RegisterHam(Ham_Killed, "player", "fw_player_killed")
  181.  
  182. register_event("CurWeapon", "Event_Change_Weapon", "be", "1=1")
  183.  
  184. register_forward(FM_SetModel, "fw_SetModel")
  185. register_forward(FM_EmitSound, "Fwd_EmitSound")
  186.  
  187. /*============================================================
  188. Cvar's
  189. ============================================================*/
  190. g_killjp = register_cvar("jb_killJP", "5");
  191. g_killhsjp = register_cvar("jb_bonushsJP", "2");
  192. g_startjp = register_cvar("jb_startJP", "10");
  193. g_maxjp = register_cvar("jb_maxgiveJP", "10000");
  194.  
  195. OnOff = register_cvar("jb_Shop", "1")//1(ON) 0(OFF)
  196. OnOff2 = register_cvar("jb_ShopKnifes", "1")//1(ON) 0(OFF)
  197. help = register_cvar("jb_help", "1")//1(ON) 0(OFF)
  198.  
  199. precio1 = register_cvar("jb_pFlash", "8")
  200. precio2 = register_cvar("jb_pHe", "11")
  201. precio3 = register_cvar("jb_pHEFL", "22")
  202. precio4 = register_cvar("jb_pWalk", "25")
  203. precio5 = register_cvar("jb_pFast", "28")
  204. precio6 = register_cvar("jb_pDrugs", "30")
  205. precio7 = register_cvar("jb_pGlock", "36")
  206.  
  207. precioC1 = register_cvar("jb_pKnife1", "5")
  208. precioC2 = register_cvar("jb_pKnife2", "20")
  209. precioC3 = register_cvar("jb_pKnife3", "25")
  210. precioC4 = register_cvar("jb_pKnife4", "36")
  211.  
  212. TDefaultDano = register_cvar("jb_dKnifeT", "20")
  213. CTDefaultDano = register_cvar("jb_dKnifeCT", "100")
  214. PaloDano = register_cvar("jb_dKnife1", "30")
  215. HachaDano = register_cvar("jb_dKnife2", "60")
  216. MacheteDano = register_cvar("jb_dKnife3", "80")
  217. MotocierraDano = register_cvar("jb_dKnife4", "200")
  218.  
  219. hTDefaultDano = register_cvar("jb_dHsKnifeT", "30")
  220. hCTDefaultDano = register_cvar("jb_dHsKnifeCT", "80")
  221. hPaloDano = register_cvar("jb_dhsKnife1", "45")
  222. hHachaDano = register_cvar("jb_dhsKnife2", "75")
  223. hMacheteDano = register_cvar("jb_dhsKnife3", "95")
  224.  
  225. Vida = register_cvar("jb_drLife", "200")
  226. Armor = register_cvar("jb_drArmor", "200")
  227.  
  228. glock1 = register_cvar("jb_gClip", "20")
  229. glock2 = register_cvar("jb_gAmmo", "0")
  230.  
  231. g_iMsgSayText = get_user_msgid("SayText")
  232. syncObj = CreateHudSyncObj()
  233.  
  234.  
  235. /*============================================================
  236. Multi Lengual!
  237. ============================================================*/
  238. register_dictionary("jbshop.txt")
  239. }
  240.  
  241. /*============================================================
  242. Precaches
  243. ============================================================*/
  244. public plugin_precache()
  245. {
  246. precache_sound(Si)
  247. precache_sound(No)
  248.  
  249. precache_sound(t_deploy)
  250. precache_sound(t_slash1)
  251. precache_sound(t_slash2)
  252. precache_sound(t_stab)
  253. precache_sound(t_wall)
  254. precache_sound(t_hit1)
  255. precache_sound(t_hit2)
  256. precache_sound(t_hit3)
  257. precache_sound(t_hit4)
  258.  
  259. precache_sound(ct_deploy)
  260. precache_sound(ct_slash1)
  261. precache_sound(ct_slash2)
  262. precache_sound(ct_stab)
  263. precache_sound(ct_wall)
  264. precache_sound(ct_hit1)
  265. precache_sound(ct_hit2)
  266. precache_sound(ct_hit3)
  267. precache_sound(ct_hit4)
  268.  
  269. precache_sound(palo_deploy)
  270. precache_sound(palo_slash1)
  271. precache_sound(palo_slash2)
  272. precache_sound(palo_stab)
  273. precache_sound(palo_wall)
  274. precache_sound(palo_hit1)
  275. precache_sound(palo_hit2)
  276. precache_sound(palo_hit3)
  277. precache_sound(palo_hit4)
  278.  
  279. precache_sound(machete_deploy)
  280. precache_sound(machete_slash1)
  281. precache_sound(machete_slash2)
  282. precache_sound(machete_stab)
  283. precache_sound(machete_wall)
  284. precache_sound(machete_hit1)
  285. precache_sound(machete_hit2)
  286. precache_sound(machete_hit3)
  287. precache_sound(machete_hit4)
  288.  
  289. precache_sound(hacha_deploy)
  290. precache_sound(hacha_slash1)
  291. precache_sound(hacha_slash2)
  292. precache_sound(hacha_stab)
  293. precache_sound(hacha_wall)
  294. precache_sound(hacha_hit1)
  295. precache_sound(hacha_hit2)
  296. precache_sound(hacha_hit3)
  297.  
  298. precache_sound(motocierra_deploy)
  299. precache_sound(motocierra_slash)
  300. precache_sound(motocierra_stab)
  301. precache_sound(motocierra_wall)
  302. precache_sound(motocierra_hit1)
  303. precache_sound(motocierra_hit2)
  304.  
  305.  
  306. precache_model(VIEW_MODELT)
  307. precache_model(PLAYER_MODELT)
  308. precache_model(VIEW_MODELCT)
  309. precache_model(PLAYER_MODELCT)
  310. precache_model(VIEW_Palo)
  311. precache_model(PLAYER_Palo)
  312. precache_model(VIEW_Hacha)
  313. precache_model(PLAYER_Hacha)
  314. precache_model(VIEW_Machete)
  315. precache_model(PLAYER_Machete)
  316. precache_model(VIEW_Moto)
  317. precache_model(PLAYER_Moto)
  318. precache_model(WORLD_MODEL)
  319.  
  320. return PLUGIN_CONTINUE
  321. }
  322.  
  323. /*============================================================
  324.   KNIFE SHOP
  325. ============================================================*/
  326. public Tienda1(id)
  327. {
  328. if(get_pcvar_num(OnOff2))
  329. {
  330. if (get_user_team(id) == 1 )
  331. {
  332. static Item[64]
  333.  
  334. formatex(Item, charsmax(Item),"\y%L", LANG_PLAYER, "SHOP")
  335. new Menu = menu_create(Item, "CuchilleroHandler")
  336.  
  337. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "KNIFE1", get_pcvar_num(precioC1))
  338. menu_additem(Menu, Item, "1")
  339.  
  340. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "KNIFE2", get_pcvar_num(precioC2))
  341. menu_additem(Menu, Item, "2")
  342.  
  343. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "KNIFE3", get_pcvar_num(precioC3))
  344. menu_additem(Menu, Item, "3")
  345.  
  346. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "KNIFE4", get_pcvar_num(precioC4))
  347. menu_additem(Menu, Item, "4")
  348.  
  349. menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
  350. menu_display(id, Menu)
  351. }
  352. }
  353. return PLUGIN_HANDLED
  354. }
  355.  
  356. public CuchilleroHandler(id, menu, item)
  357. {
  358. if( item == MENU_EXIT )
  359. {
  360. menu_destroy(menu);
  361. return PLUGIN_HANDLED;
  362. }
  363. new data[6], iName[64];
  364. new access, callback;
  365. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
  366.  
  367. new vivo = is_user_alive(id)
  368. new Obtener1 = get_pcvar_num(precioC1)
  369. new Obtener2 = get_pcvar_num(precioC2)
  370. new Obtener3 = get_pcvar_num(precioC3)
  371. new Obtener4 = get_pcvar_num(precioC4)
  372.  
  373. new key = str_to_num(data);
  374.  
  375. switch(key)
  376. {
  377. case 1:
  378. {
  379. if (g_jbpacks[id]>= Obtener1 && vivo)
  380. {
  381. g_jbpacks[id] -= Obtener1
  382. CTCuchillo[id] = 0
  383. TCuchillo[id] = 0
  384. Destapador[id] = 1
  385. Hacha[id] = 0
  386. Machete[id] = 0
  387. Motocierra[id] = 0
  388.  
  389.  
  390. ham_strip_weapon(id, "weapon_knife")
  391. give_item(id, "weapon_knife")
  392.  
  393. ChatColor(id, "%L", LANG_PLAYER, "BUY_KNIFE1")
  394. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  395. }
  396. else
  397. {
  398. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  399. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  400. }
  401. }
  402.  
  403. case 2:
  404. {
  405. if (g_jbpacks[id] >= Obtener2 && vivo)
  406. {
  407.  
  408. g_jbpacks[id] -= Obtener2
  409. CTCuchillo[id] = 0
  410. TCuchillo[id] = 0
  411. Destapador[id] = 0
  412. Hacha[id] = 1
  413. Machete[id] = 0
  414. Motocierra[id] = 0
  415.  
  416. ham_strip_weapon(id, "weapon_knife")
  417. give_item(id, "weapon_knife")
  418.  
  419. ChatColor(id, "%L", LANG_PLAYER, "BUY_KNIFE2")
  420. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  421. }
  422. else
  423. {
  424. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  425. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  426. }
  427. }
  428.  
  429. case 3:
  430. {
  431. if (g_jbpacks[id] >= Obtener3 && vivo)
  432. {
  433.  
  434. g_jbpacks[id] -= Obtener3
  435. CTCuchillo[id] = 0
  436. TCuchillo[id] = 0
  437. Destapador[id] = 0
  438. Hacha[id] = 0
  439. Machete[id] = 1
  440. Motocierra[id] = 0
  441.  
  442. ham_strip_weapon(id, "weapon_knife")
  443. give_item(id, "weapon_knife")
  444.  
  445. ChatColor(id, "%L", LANG_PLAYER, "BUY_KNIFE3")
  446. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  447. }
  448. else
  449. {
  450. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  451. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  452. }
  453. }
  454.  
  455. case 4:
  456. {
  457. if (g_jbpacks[id] >= Obtener4 && vivo)
  458. {
  459.  
  460. g_jbpacks[id] -= Obtener4
  461. CTCuchillo[id] = 0
  462. TCuchillo[id] = 0
  463. Destapador[id] = 0
  464. Hacha[id] = 0
  465. Machete[id] = 0
  466. Motocierra[id] = 1
  467.  
  468.  
  469. ham_strip_weapon(id, "weapon_knife")
  470. give_item(id, "weapon_knife")
  471.  
  472. ChatColor(id, "%L", LANG_PLAYER, "BUY_KNIFE4")
  473. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  474. }
  475. else
  476. {
  477. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  478. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  479. }
  480. }
  481. }
  482. menu_destroy(menu);
  483. return PLUGIN_HANDLED;
  484. }
  485.  
  486. /*============================================================
  487.   ITEM'S MENU
  488. ============================================================*/
  489. public Tienda(id)
  490. {
  491. if(get_pcvar_num(OnOff))
  492. {
  493. if(get_pcvar_num(OnOff) && Ronda[id])
  494. {
  495. if(is_user_alive(id))
  496. {
  497. if (cs_get_user_team(id) == CS_TEAM_T )
  498. {
  499. new contador=0;
  500. new players[32], num, tempid;
  501.  
  502. get_players(players, num)
  503.  
  504. for (new i=0; i<num; i++)
  505. {
  506. tempid = players[i]
  507.  
  508. if (get_user_team(tempid)==1 && is_user_alive(tempid))
  509. {
  510. contador++;
  511. }
  512. }
  513. if ( contador == 1 )
  514. {
  515. ChatColor(id, "%L", LANG_PLAYER, "LAST")
  516. }
  517. else if ( contador >= 2 )
  518. {
  519. static Item[64]
  520.  
  521. formatex(Item, charsmax(Item),"\y%L", LANG_PLAYER, "SHOP")
  522. new Menu = menu_create(Item, "TiendaHandler")
  523.  
  524. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "FLASH", get_pcvar_num(precio1))
  525. menu_additem(Menu, Item, "1")
  526.  
  527. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "HE", get_pcvar_num(precio2))
  528. menu_additem(Menu, Item, "2")
  529.  
  530. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "HEFLASH", get_pcvar_num(precio3))
  531. menu_additem(Menu, Item, "3")
  532.  
  533. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "FOOTSTEPS", get_pcvar_num(precio4))
  534. menu_additem(Menu, Item, "4")
  535.  
  536. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "SPEED", get_pcvar_num(precio5))
  537. menu_additem(Menu, Item, "5")
  538.  
  539. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "DRUGS", get_pcvar_num(precio6))
  540. menu_additem(Menu, Item, "6")
  541.  
  542. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "GLOCK", get_pcvar_num(precio7))
  543. menu_additem(Menu, Item, "7")
  544.  
  545. menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
  546. menu_display(id, Menu)
  547. }
  548. }
  549. else
  550. {
  551. ChatColor(id, "%L", LANG_PLAYER, "ONLY")
  552. }
  553. }
  554. else
  555. {
  556. ChatColor(id, "%L", LANG_PLAYER, "DEAD")
  557. }
  558. }
  559. else
  560. {
  561. ChatColor(id, "%L", LANG_PLAYER, "ONE_TIME")
  562. }
  563. }
  564. else
  565. {
  566. ChatColor(id, "%L", LANG_PLAYER, "SHOP_OFF")
  567. }
  568. return PLUGIN_HANDLED
  569. }
  570.  
  571.  
  572. public TiendaHandler(id, menu, item)
  573. {
  574. if( item == MENU_EXIT )
  575. {
  576. menu_destroy(menu);
  577. return PLUGIN_HANDLED;
  578. }
  579. new data[6], iName[64];
  580. new access, callback;
  581. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
  582. new vivo = is_user_alive(id)
  583. new gmsg_SetFOV = get_user_msgid("SetFOV")
  584. new Obtener1 = get_pcvar_num(precio1)
  585. new Obtener2 = get_pcvar_num(precio2)
  586. new Obtener3 = get_pcvar_num(precio3)
  587. new Obtener4 = get_pcvar_num(precio4)
  588. new Obtener5 = get_pcvar_num(precio5)
  589. new Obtener6 = get_pcvar_num(precio6)
  590. new Obtener7 = get_pcvar_num(precio7)
  591. new vida1 = get_user_health(id)
  592. new vida2 = get_pcvar_num(Vida)
  593. new armor1 = get_user_armor(id)
  594. new armor2 = get_pcvar_num(Armor)
  595.  
  596. new key = str_to_num(data);
  597. switch(key)
  598. {
  599. case 1:
  600. {
  601. if (g_jbpacks[id] >= Obtener1 && vivo)
  602. {
  603. g_jbpacks[id] -= Obtener1
  604. ChatColor(id, "%L", LANG_PLAYER, "BUY_FLASH")
  605. give_item(id, "weapon_flashbang")
  606. give_item(id, "weapon_flashbang")
  607. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  608. Ronda[id] = 0
  609. }
  610. else
  611. {
  612. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  613. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  614. }
  615. }
  616. case 2:
  617. {
  618.  
  619. if (g_jbpacks[id] >= Obtener2 && vivo)
  620. {
  621. g_jbpacks[id] -= Obtener2
  622. ChatColor(id, "%L", LANG_PLAYER, "BUY_HE")
  623. give_item(id, "weapon_hegrenade")
  624. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  625. Ronda[id] = 0
  626. }
  627. else
  628. {
  629. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  630. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  631. }
  632. }
  633. case 3:
  634. {
  635.  
  636. if (g_jbpacks[id] >= Obtener3 && vivo)
  637. {
  638. g_jbpacks[id] -= Obtener3
  639. ChatColor(id, "%L", LANG_PLAYER, "BUY_HEFLASH")
  640. give_item(id, "weapon_hegrenade")
  641. give_item(id, "weapon_flashbang")
  642. give_item(id, "weapon_flashbang")
  643. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  644. Ronda[id] = 0
  645. }
  646. else
  647. {
  648. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  649. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  650. }
  651. }
  652. case 4:
  653. {
  654.  
  655. if (g_jbpacks[id] >= Obtener4 && vivo)
  656. {
  657. g_jbpacks[id] -= Obtener4
  658. ChatColor(id, "%L", LANG_PLAYER, "BUY_FOOTSTEPS")
  659. set_user_footsteps(id, 1)
  660. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  661. Ronda[id] = 0
  662. }
  663. else
  664. {
  665. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  666. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  667. }
  668. }
  669. case 5:
  670. {
  671. if (g_jbpacks[id] >= Obtener5 && vivo)
  672. {
  673. g_jbpacks[id] -= Obtener5
  674. ChatColor(id, "%L", LANG_PLAYER, "BUY_SPEED")
  675. set_user_maxspeed(id, 500.0)
  676. Speed[id] = 1
  677. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  678. Ronda[id] = 0
  679. }
  680. else
  681. {
  682. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  683. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  684. }
  685. }
  686. case 6:
  687. {
  688. if (g_jbpacks[id] >= Obtener6 && vivo)
  689. {
  690. g_jbpacks[id] -= Obtener6
  691. ChatColor(id, "%L", LANG_PLAYER, "BUY_DRUGS")
  692. set_user_armor(id, armor1 + armor2)
  693. set_user_health(id, vida1 + vida2)
  694. set_user_maxspeed(id, 380.0)
  695. Speed2[id] = 1
  696. message_begin( MSG_ONE, gmsg_SetFOV, { 0, 0, 0 }, id )
  697. write_byte( 180 )
  698. message_end( )
  699. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  700. Ronda[id] = 0
  701. }
  702. else
  703. {
  704. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  705. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  706. }
  707. }
  708. case 7:
  709. {
  710. if (g_jbpacks[id] >= Obtener7 && vivo)
  711. {
  712. g_jbpacks[id] -= Obtener7
  713. ChatColor(id, "%L", LANG_PLAYER, "BUY_GLOCK")
  714. cs_set_weapon_ammo( give_item( id, "weapon_glock18" ), get_pcvar_num(glock1))
  715. cs_set_user_bpammo(id, CSW_GLOCK18, get_pcvar_num(glock2))
  716. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  717. Ronda[id] = 0
  718. }
  719. else
  720. {
  721. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  722. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  723. }
  724. }
  725. }
  726. menu_destroy(menu);
  727. return PLUGIN_HANDLED;
  728. }
  729.  
  730. public client_putinserver(id)
  731. {
  732. g_jbpacks[id] = get_pcvar_num(g_startjp)
  733. set_task(1.0, "JailbreakPacks", id, _, _, "b")
  734. }
  735.  
  736. public JailbreakPacks(id)
  737. {
  738. set_hudmessage(142, 239, 39, 0.50, 0.90, 0, 6.0, 2.5)
  739. ShowSyncHudMsg(id, syncObj,"JBPacks: %i", g_jbpacks[id])
  740. }
  741.  
  742. public duel_menu(id)
  743. {
  744. if (!is_user_admin(id))
  745. {
  746. ChatColor(id, "%L", LANG_PLAYER, "CANT")
  747. return PLUGIN_HANDLED
  748. }
  749.  
  750. static opcion[64]
  751.  
  752. formatex(opcion, charsmax(opcion),"\y%L", LANG_PLAYER, "JBPACKS")
  753. new iMenu = menu_create(opcion, "menu")
  754.  
  755. formatex(opcion, charsmax(opcion),"\w%L", LANG_PLAYER, "GIVE_JBPACKS")
  756. menu_additem(iMenu, opcion, "1")
  757.  
  758. formatex(opcion, charsmax(opcion),"\w%L", LANG_PLAYER, "TAKE_JBPACKS")
  759. menu_additem(iMenu, opcion, "2")
  760.  
  761. menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
  762. menu_display(id, iMenu, 0)
  763.  
  764. return PLUGIN_HANDLED
  765. }
  766.  
  767. public menu(id, menu, item)
  768. {
  769.  
  770. if (item == MENU_EXIT)
  771. {
  772. menu_destroy(menu)
  773. return PLUGIN_HANDLED
  774. }
  775.  
  776. new Data[6], Name[64]
  777. new Access, Callback
  778.  
  779. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
  780.  
  781. new Key = str_to_num(Data)
  782.  
  783. switch (Key)
  784. {
  785. case 1:
  786. {
  787. regalar[id] = 1
  788. quitar[id] = 0
  789. escojer(id)
  790. }
  791. case 2:
  792. {
  793. quitar[id] = 1
  794. regalar[id] = 0
  795. escojer(id)
  796. }
  797. }
  798.  
  799. menu_destroy(menu)
  800. return PLUGIN_HANDLED
  801. }
  802.  
  803.  
  804. public escojer(id)
  805. {
  806. static opcion[64]
  807.  
  808. formatex(opcion, charsmax(opcion),"\y%L", LANG_PLAYER, "CHOOSE")
  809. new iMenu = menu_create(opcion, "choose")
  810.  
  811. new players[32], pnum, tempid
  812. new szName[32], szTempid[10]
  813.  
  814. get_players(players, pnum, "a")
  815.  
  816. for( new i; i<pnum; i++ )
  817. {
  818. tempid = players[i]
  819.  
  820. get_user_name(tempid, szName, 31)
  821. num_to_str(tempid, szTempid, 9)
  822.  
  823. formatex(opcion, charsmax(opcion), "\w%s \rJbPacks[%d]", szName, g_jbpacks[tempid])
  824. menu_additem(iMenu, opcion, szTempid, 0)
  825. }
  826.  
  827. menu_display(id, iMenu)
  828. return PLUGIN_HANDLED
  829. }
  830.  
  831. public choose(id, menu, item)
  832. {
  833. if( item == MENU_EXIT )
  834. {
  835. menu_destroy(menu)
  836. return PLUGIN_HANDLED
  837. }
  838.  
  839. new Data[6], Name[64]
  840. new Access, Callback
  841. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
  842.  
  843. new tempid = str_to_num(Data)
  844.  
  845. gidPlayer[id] = tempid
  846. client_cmd(id, "messagemode JbPacks")
  847.  
  848. menu_destroy(menu)
  849. return PLUGIN_HANDLED
  850. }
  851.  
  852. public player(id)
  853. {
  854. new say[300]
  855. read_args(say, charsmax(say))
  856.  
  857. remove_quotes(say)
  858.  
  859. if(!is_str_num(say) || equal(say, ""))
  860. return PLUGIN_HANDLED
  861.  
  862. jbpacks(id, say)
  863.  
  864. return PLUGIN_CONTINUE
  865. }
  866.  
  867. jbpacks(id, say[]) {
  868. new amount = str_to_num(say)
  869. new victim = gidPlayer[id]
  870.  
  871. new vname[32]
  872.  
  873. if(victim > 0)
  874. {
  875. get_user_name(victim, vname, 31)
  876.  
  877. if(regalar[id])
  878. {
  879. if(amount > get_pcvar_num(g_maxjp))
  880. {
  881. g_jbpacks[victim] = get_pcvar_num(g_maxjp)
  882. }
  883. else
  884. {
  885. g_jbpacks[victim] = g_jbpacks[victim] + amount
  886. }
  887. ChatColor(0, "%L", LANG_PLAYER, "GIVE_MSG", amount, vname)
  888. }
  889. if(quitar[id])
  890. {
  891. if(amount > g_jbpacks[victim])
  892. {
  893. g_jbpacks[victim] = 0
  894. ChatColor(0, "%L", LANG_PLAYER, "TAKE_ALL", vname)
  895. }
  896. else
  897. {
  898. g_jbpacks[victim] = g_jbpacks[victim] - amount
  899. ChatColor(0, "%L", LANG_PLAYER, "TAKE_MSG", amount, vname)
  900. }
  901.  
  902. }
  903. }
  904.  
  905. return PLUGIN_HANDLED
  906. }
  907.  
  908. public Fwd_PlayerSpawn_Post(id)
  909. {
  910. if (is_user_alive(id))
  911. {
  912. if(get_user_team(id) == 1) strip_user_weapons(id); give_item(id, "weapon_knife")
  913.  
  914. set_user_footsteps(id, 0)
  915. Speed[id] = 0
  916. Speed2[id] = 0
  917. Ronda[id] = 1
  918. CTCuchillo[id] = 1
  919. TCuchillo[id] = 1
  920. Destapador[id] = 0
  921. Hacha[id] = 0
  922. Machete[id] = 0
  923. Motocierra[id] = 0
  924. Tienda1(id)
  925. if(get_pcvar_num(help)) ChatColor(id, "%L", LANG_PLAYER, "HELP")
  926. }
  927. }
  928.  
  929. public FwdTakeDamage(victim, inflictor, attacker, Float:damage, damage_bits)
  930. {
  931.  
  932. if (is_valid_player(attacker) && get_user_weapon(attacker) == CSW_KNIFE)
  933. {
  934. switch(get_user_team(attacker))
  935. {
  936. case 1:
  937. {
  938. if(TCuchillo[attacker])
  939. {
  940.  
  941. SetHamParamFloat(4, get_pcvar_float(TDefaultDano))
  942.  
  943. if(get_pdata_int(victim, 75) == HIT_HEAD)
  944. {
  945. SetHamParamFloat(4, get_pcvar_float(hTDefaultDano))
  946. }
  947. }
  948.  
  949. if(Destapador[attacker])
  950. {
  951. SetHamParamFloat(4, get_pcvar_float(PaloDano))
  952.  
  953. if(get_pdata_int(victim, 75) == HIT_HEAD)
  954. {
  955. SetHamParamFloat(4, get_pcvar_float(hPaloDano))
  956. }
  957. }
  958.  
  959. if(Hacha[attacker])
  960. {
  961. SetHamParamFloat(4, get_pcvar_float(HachaDano))
  962.  
  963. if(get_pdata_int(victim, 75) == HIT_HEAD)
  964. {
  965. SetHamParamFloat(4, get_pcvar_float(hHachaDano))
  966. }
  967. }
  968.  
  969. if(Machete[attacker])
  970. {
  971. SetHamParamFloat(4, get_pcvar_float(MacheteDano))
  972.  
  973. if(get_pdata_int(victim, 75) == HIT_HEAD)
  974. {
  975. SetHamParamFloat(4, get_pcvar_float(hMacheteDano))
  976. }
  977. }
  978.  
  979. if(Motocierra[attacker])
  980. {
  981. SetHamParamFloat(4, get_pcvar_float(MotocierraDano))
  982. }
  983. }
  984. case 2:
  985. {
  986. if(CTCuchillo[attacker])
  987. {
  988. SetHamParamFloat(4, get_pcvar_float(CTDefaultDano))
  989.  
  990. if(get_pdata_int(victim, 75) == HIT_HEAD)
  991. {
  992. SetHamParamFloat(4, get_pcvar_float(hCTDefaultDano))
  993. }
  994. }
  995. }
  996. }
  997. }
  998. return HAM_HANDLED
  999. }
  1000.  
  1001. public fw_player_killed(victim, attacker, shouldgib)
  1002. {
  1003. if(get_user_team(attacker) == 1)
  1004. {
  1005. g_jbpacks[attacker] += get_pcvar_num(g_killjp)
  1006.  
  1007. if(get_pdata_int(victim, 75) == HIT_HEAD)
  1008. {
  1009. g_jbpacks[attacker] += get_pcvar_num(g_killhsjp)
  1010. }
  1011. }
  1012. }
  1013.  
  1014.  
  1015. public Event_Change_Weapon(id)
  1016. {
  1017. new weaponID = read_data(2)
  1018.  
  1019. switch (get_user_team(id))
  1020. {
  1021. case 1:
  1022. {
  1023. if(Speed[id])
  1024. {
  1025. set_user_maxspeed(id, 500.0)
  1026. }
  1027.  
  1028. if(Speed2[id])
  1029. {
  1030. set_user_maxspeed(id, 380.0)
  1031. }
  1032.  
  1033. if(weaponID == CSW_KNIFE && get_pcvar_num(OnOff2))
  1034. {
  1035. if(TCuchillo[id])
  1036. {
  1037. set_pev(id, pev_viewmodel2, VIEW_MODELT)
  1038. set_pev(id, pev_weaponmodel2, PLAYER_MODELT)
  1039. }
  1040.  
  1041. if(Destapador[id])
  1042. {
  1043. set_pev(id, pev_viewmodel2, VIEW_Palo)
  1044. set_pev(id, pev_weaponmodel2, PLAYER_Palo)
  1045. }
  1046.  
  1047. if(Hacha[id])
  1048. {
  1049. set_pev(id, pev_viewmodel2, VIEW_Hacha)
  1050. set_pev(id, pev_weaponmodel2, PLAYER_Hacha)
  1051. }
  1052.  
  1053. if(Machete[id])
  1054. {
  1055. set_pev(id, pev_viewmodel2, VIEW_Machete)
  1056. set_pev(id, pev_weaponmodel2, PLAYER_Machete)
  1057. }
  1058.  
  1059. if(Motocierra[id])
  1060. {
  1061. set_pev(id, pev_viewmodel2, VIEW_Moto)
  1062. set_pev(id, pev_weaponmodel2, PLAYER_Moto)
  1063. }
  1064.  
  1065.  
  1066. }
  1067. }
  1068. case 2:
  1069. {
  1070. if(CTCuchillo[id] && weaponID == CSW_KNIFE)
  1071. {
  1072. set_pev(id, pev_viewmodel2, VIEW_MODELCT)
  1073. set_pev(id, pev_weaponmodel2, PLAYER_MODELCT)
  1074. }
  1075. }
  1076. }
  1077. return PLUGIN_CONTINUE
  1078. }
  1079.  
  1080. public fw_SetModel(entity, model[])
  1081. {
  1082. if(!pev_valid(entity))
  1083. return FMRES_IGNORED
  1084.  
  1085. if(!equali(model, OLDWORLD_MODEL))
  1086. return FMRES_IGNORED
  1087.  
  1088. new className[33]
  1089. pev(entity, pev_classname, className, 32)
  1090.  
  1091. if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
  1092. {
  1093. engfunc(EngFunc_SetModel, entity, WORLD_MODEL)
  1094. return FMRES_SUPERCEDE
  1095. }
  1096. return FMRES_IGNORED
  1097. }
  1098.  
  1099. public Fwd_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
  1100. {
  1101.  
  1102. if (!is_user_connected(id))
  1103. return FMRES_IGNORED;
  1104.  
  1105. if(CTCuchillo[id])
  1106. {
  1107. if(get_user_team(id) == 2)
  1108. {
  1109. if (equal(sample[8], "kni", 3))
  1110. {
  1111. if (equal(sample[14], "sla", 3))
  1112. {
  1113. switch (random_num(1, 2))
  1114. {
  1115. case 1: engfunc(EngFunc_EmitSound, id, channel, ct_slash1, volume, attn, flags, pitch)
  1116. case 2: engfunc(EngFunc_EmitSound, id, channel, ct_slash2, volume, attn, flags, pitch)
  1117. }
  1118.  
  1119. return FMRES_SUPERCEDE;
  1120. }
  1121. if(equal(sample,"weapons/knife_deploy1.wav"))
  1122. {
  1123. engfunc(EngFunc_EmitSound, id, channel, ct_deploy, volume, attn, flags, pitch)
  1124. return FMRES_SUPERCEDE;
  1125. }
  1126. if (equal(sample[14], "hit", 3))
  1127. {
  1128. if (sample[17] == 'w')
  1129. {
  1130. engfunc(EngFunc_EmitSound, id, channel, ct_wall, volume, attn, flags, pitch)
  1131. return FMRES_SUPERCEDE;
  1132. }
  1133. else
  1134. {
  1135. switch (random_num(1, 4))
  1136. {
  1137. case 1: engfunc(EngFunc_EmitSound, id, channel, ct_hit1, volume, attn, flags, pitch)
  1138. case 2: engfunc(EngFunc_EmitSound, id, channel, ct_hit2, volume, attn, flags, pitch)
  1139. case 3: engfunc(EngFunc_EmitSound, id, channel, ct_hit3, volume, attn, flags, pitch)
  1140. case 4: engfunc(EngFunc_EmitSound, id, channel, ct_hit4, volume, attn, flags, pitch)
  1141. }
  1142.  
  1143. return FMRES_SUPERCEDE;
  1144. }
  1145. }
  1146. if (equal(sample[14], "sta", 3))
  1147. {
  1148. engfunc(EngFunc_EmitSound, id, channel, ct_stab, volume, attn, flags, pitch)
  1149. return FMRES_SUPERCEDE;
  1150. }
  1151. }
  1152. }
  1153. }
  1154.  
  1155. if(TCuchillo[id])
  1156. {
  1157. if(get_user_team(id) == 1)
  1158. {
  1159. if (equal(sample[8], "kni", 3))
  1160. {
  1161. if (equal(sample[14], "sla", 3))
  1162. {
  1163. switch (random_num(1, 2))
  1164. {
  1165. case 1: engfunc(EngFunc_EmitSound, id, channel, t_slash1, volume, attn, flags, pitch)
  1166. case 2: engfunc(EngFunc_EmitSound, id, channel, t_slash2, volume, attn, flags, pitch)
  1167. }
  1168.  
  1169. return FMRES_SUPERCEDE;
  1170. }
  1171. if(equal(sample,"weapons/knife_deploy1.wav"))
  1172. {
  1173. engfunc(EngFunc_EmitSound, id, channel, t_deploy, volume, attn, flags, pitch)
  1174. return FMRES_SUPERCEDE;
  1175. }
  1176. if (equal(sample[14], "hit", 3))
  1177. {
  1178. if (sample[17] == 'w')
  1179. {
  1180. engfunc(EngFunc_EmitSound, id, channel, t_wall, volume, attn, flags, pitch)
  1181. return FMRES_SUPERCEDE;
  1182. }
  1183. else
  1184. {
  1185. switch (random_num(1, 4))
  1186. {
  1187. case 1: engfunc(EngFunc_EmitSound, id, channel, t_hit1, volume, attn, flags, pitch)
  1188. case 2: engfunc(EngFunc_EmitSound, id, channel, t_hit2, volume, attn, flags, pitch)
  1189. case 3: engfunc(EngFunc_EmitSound, id, channel, t_hit3, volume, attn, flags, pitch)
  1190. case 4: engfunc(EngFunc_EmitSound, id, channel, t_hit4, volume, attn, flags, pitch)
  1191. }
  1192.  
  1193. return FMRES_SUPERCEDE;
  1194. }
  1195. }
  1196. if (equal(sample[14], "sta", 3))
  1197. {
  1198. engfunc(EngFunc_EmitSound, id, channel, t_stab, volume, attn, flags, pitch)
  1199. return FMRES_SUPERCEDE;
  1200. }
  1201. }
  1202. }
  1203. }
  1204.  
  1205. if(Destapador[id])
  1206. {
  1207. if (equal(sample[8], "kni", 3))
  1208. {
  1209. if (equal(sample[14], "sla", 3))
  1210. {
  1211. switch (random_num(1, 2))
  1212. {
  1213. case 1: engfunc(EngFunc_EmitSound, id, channel, palo_slash1, volume, attn, flags, pitch)
  1214. case 2: engfunc(EngFunc_EmitSound, id, channel, palo_slash2, volume, attn, flags, pitch)
  1215.  
  1216. }
  1217.  
  1218. return FMRES_SUPERCEDE;
  1219. }
  1220. if(equal(sample,"weapons/knife_deploy1.wav"))
  1221. {
  1222. engfunc(EngFunc_EmitSound, id, channel, palo_deploy, volume, attn, flags, pitch)
  1223. return FMRES_SUPERCEDE;
  1224. }
  1225. if (equal(sample[14], "hit", 3))
  1226. {
  1227. if (sample[17] == 'w')
  1228. {
  1229. engfunc(EngFunc_EmitSound, id, channel, palo_wall, volume, attn, flags, pitch)
  1230. return FMRES_SUPERCEDE;
  1231. }
  1232. else
  1233. {
  1234. switch (random_num(1, 4))
  1235. {
  1236. case 1:engfunc(EngFunc_EmitSound, id, channel, palo_hit1, volume, attn, flags, pitch)
  1237. case 2:engfunc(EngFunc_EmitSound, id, channel, palo_hit2, volume, attn, flags, pitch)
  1238. case 3:engfunc(EngFunc_EmitSound, id, channel, palo_hit3, volume, attn, flags, pitch)
  1239. case 4:engfunc(EngFunc_EmitSound, id, channel, palo_hit4, volume, attn, flags, pitch)
  1240. }
  1241.  
  1242. return FMRES_SUPERCEDE;
  1243. }
  1244. }
  1245. if (equal(sample[14], "sta", 3))
  1246. {
  1247. engfunc(EngFunc_EmitSound, id, channel, palo_stab, volume, attn, flags, pitch)
  1248. return FMRES_SUPERCEDE;
  1249. }
  1250. }
  1251. }
  1252.  
  1253. if(Hacha[id])
  1254. {
  1255.  
  1256. if (equal(sample[8], "kni", 3))
  1257. {
  1258. if (equal(sample[14], "sla", 3))
  1259. {
  1260. switch (random_num(1, 2))
  1261. {
  1262. case 1: engfunc(EngFunc_EmitSound, id, channel, hacha_slash1, volume, attn, flags, pitch)
  1263. case 2: engfunc(EngFunc_EmitSound, id, channel, hacha_slash2, volume, attn, flags, pitch)
  1264. }
  1265.  
  1266. return FMRES_SUPERCEDE;
  1267. }
  1268. if(equal(sample,"weapons/knife_deploy1.wav"))
  1269. {
  1270. engfunc(EngFunc_EmitSound, id, channel, hacha_deploy, volume, attn, flags, pitch)
  1271. return FMRES_SUPERCEDE;
  1272. }
  1273. if (equal(sample[14], "hit", 3))
  1274. {
  1275. if (sample[17] == 'w')
  1276. {
  1277. engfunc(EngFunc_EmitSound, id, channel, hacha_wall, volume, attn, flags, pitch)
  1278. return FMRES_SUPERCEDE;
  1279. }
  1280. else
  1281. {
  1282. switch (random_num(1, 3))
  1283. {
  1284. case 1: engfunc(EngFunc_EmitSound, id, channel, hacha_hit1, volume, attn, flags, pitch)
  1285. case 2: engfunc(EngFunc_EmitSound, id, channel, hacha_hit2, volume, attn, flags, pitch)
  1286. case 3: engfunc(EngFunc_EmitSound, id, channel, hacha_hit3, volume, attn, flags, pitch)
  1287. }
  1288.  
  1289. return FMRES_SUPERCEDE;
  1290. }
  1291. }
  1292. if (equal(sample[14], "sta", 3))
  1293. {
  1294. engfunc(EngFunc_EmitSound, id, channel, hacha_stab, volume, attn, flags, pitch)
  1295. return FMRES_SUPERCEDE;
  1296. }
  1297. }
  1298. }
  1299.  
  1300. if(Machete[id])
  1301. {
  1302. if (equal(sample[8], "kni", 3))
  1303. {
  1304. if (equal(sample[14], "sla", 3))
  1305. {
  1306. switch (random_num(1, 2))
  1307. {
  1308. case 1: engfunc(EngFunc_EmitSound, id, channel, machete_slash1, volume, attn, flags, pitch)
  1309. case 2: engfunc(EngFunc_EmitSound, id, channel, machete_slash2, volume, attn, flags, pitch)
  1310. }
  1311. return FMRES_SUPERCEDE;
  1312. }
  1313. if(equal(sample,"weapons/knife_deploy1.wav"))
  1314. {
  1315. engfunc(EngFunc_EmitSound, id, channel, machete_deploy, volume, attn, flags, pitch)
  1316. return FMRES_SUPERCEDE;
  1317. }
  1318. if (equal(sample[14], "hit", 3))
  1319. {
  1320. if (sample[17] == 'w')
  1321. {
  1322. engfunc(EngFunc_EmitSound, id, channel, machete_wall, volume, attn, flags, pitch)
  1323. return FMRES_SUPERCEDE;
  1324. }
  1325. else // hit
  1326. {
  1327. switch (random_num(1, 4))
  1328. {
  1329. case 1: engfunc(EngFunc_EmitSound, id, channel, machete_hit1, volume, attn, flags, pitch)
  1330. case 2: engfunc(EngFunc_EmitSound, id, channel, machete_hit2, volume, attn, flags, pitch)
  1331. case 3: engfunc(EngFunc_EmitSound, id, channel, machete_hit3, volume, attn, flags, pitch)
  1332. case 4: engfunc(EngFunc_EmitSound, id, channel, machete_hit4, volume, attn, flags, pitch)
  1333. }
  1334. return FMRES_SUPERCEDE;
  1335. }
  1336. }
  1337. if (equal(sample[14], "sta", 3))
  1338. {
  1339. engfunc(EngFunc_EmitSound, id, channel, machete_stab, volume, attn, flags, pitch)
  1340. return FMRES_SUPERCEDE;
  1341. }
  1342. }
  1343. }
  1344.  
  1345. if(Motocierra[id])
  1346. {
  1347.  
  1348. if (equal(sample[8], "kni", 3))
  1349. {
  1350. if (equal(sample[14], "sla", 3))
  1351. {
  1352. engfunc(EngFunc_EmitSound, id, channel, motocierra_slash, volume, attn, flags, pitch)
  1353. return FMRES_SUPERCEDE;
  1354. }
  1355. if(equal(sample,"weapons/knife_deploy1.wav"))
  1356. {
  1357. engfunc(EngFunc_EmitSound, id, channel, motocierra_deploy, volume, attn, flags, pitch)
  1358. return FMRES_SUPERCEDE;
  1359. }
  1360. if (equal(sample[14], "hit", 3))
  1361. {
  1362. if (sample[17] == 'w')
  1363. {
  1364. engfunc(EngFunc_EmitSound, id, channel, motocierra_wall, volume, attn, flags, pitch)
  1365. return FMRES_SUPERCEDE;
  1366. }
  1367. else
  1368. {
  1369. switch (random_num(1, 2))
  1370. {
  1371. case 1: engfunc(EngFunc_EmitSound, id, channel, motocierra_hit1, volume, attn, flags, pitch)
  1372. case 2: engfunc(EngFunc_EmitSound, id, channel, motocierra_hit2, volume, attn, flags, pitch)
  1373.  
  1374. }
  1375. return FMRES_SUPERCEDE;
  1376. }
  1377. }
  1378. if (equal(sample[14], "sta", 3))
  1379. {
  1380. engfunc(EngFunc_EmitSound, id, channel, motocierra_stab, volume, attn, flags, pitch)
  1381. return FMRES_SUPERCEDE;
  1382. }
  1383. }
  1384. }
  1385. return FMRES_IGNORED;
  1386. }
  1387.  
  1388. /*============================================================
  1389.   Stocks!
  1390. ============================================================*/
  1391. stock ChatColor(const id, const input[], any:...)
  1392. {
  1393. new count = 1, players[32]
  1394. static msg[191]
  1395. vformat(msg, 190, input, 3)
  1396.  
  1397. replace_all(msg, 190, "!g", "^4") // Green Color
  1398. replace_all(msg, 190, "!y", "^1") // Default Color
  1399. replace_all(msg, 190, "!team", "^3") // Team Color
  1400.  
  1401.  
  1402. if (id) players[0] = id; else get_players(players, count, "ch")
  1403. {
  1404. for (new i = 0; i < count; i++)
  1405. {
  1406. if (is_user_connected(players[i]))
  1407. {
  1408. message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText, _, players[i])
  1409. write_byte(players[i]);
  1410. write_string(msg);
  1411. message_end();
  1412. }
  1413. }
  1414. }
  1415. }
  1416.  
  1417. stock ham_strip_weapon(id,weapon[])
  1418. {
  1419. if(!equal(weapon,"weapon_",7)) return 0;
  1420.  
  1421. new wId = get_weaponid(weapon);
  1422. if(!wId) return 0;
  1423.  
  1424. new wEnt;
  1425. while((wEnt = engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}
  1426. if(!wEnt) return 0;
  1427.  
  1428. if(get_user_weapon(id) == wId) ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
  1429.  
  1430. if(!ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;
  1431. ExecuteHamB(Ham_Item_Kill,wEnt);
  1432.  
  1433. set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));
  1434.  
  1435. return 1;
  1436. }
  1437. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  1438. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  1439. */

_________________
banned user

Ők köszönték meg JoGoBeLLa nek ezt a hozzászólást: Puma (2013.03.08. 19:26)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Sokkoló 100sebzes
HozzászólásElküldve: 2013.03.08. 19:28 
Offline
Fanatikus
Avatar

Csatlakozott: 2012.11.02. 17:32
Hozzászólások: 182
Megköszönt másnak: 15 alkalommal
Megköszönték neki: 4 alkalommal
JoGoBeLLa írta:
itt van!:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5. #include <fakemeta>
  6. #include <fun>
  7.  
  8. #define is_valid_player(%1) (1 <= %1 <= 32)
  9.  
  10. /*============================================================
  11. Variables
  12. ============================================================*/
  13.  
  14. new
  15. OnOff,
  16. OnOff2,
  17. precio1,
  18. precio2,
  19. precio3,
  20. precio4,
  21. precio5,
  22. precio6,
  23. precio7,
  24. precioC1,
  25. precioC2,
  26. precioC3,
  27. precioC4,
  28. CTDefaultDano,
  29. TDefaultDano,
  30. PaloDano,
  31. HachaDano,
  32. MacheteDano,
  33. MotocierraDano,
  34. hTDefaultDano,
  35. hCTDefaultDano,
  36. hPaloDano,
  37. hHachaDano,
  38. hMacheteDano,
  39. Vida,
  40. Armor,
  41. glock1,
  42. glock2,
  43. help,
  44. g_killjp,
  45. g_killhsjp,
  46. g_startjp,
  47. g_maxjp,
  48. g_iMsgSayText,
  49. syncObj,
  50. Ronda[33],
  51. Speed[33],
  52. Speed2[33],
  53. TCuchillo[33],
  54. CTCuchillo[33],
  55. Destapador[33],
  56. Hacha[33],
  57. Machete[33],
  58. Motocierra[33],
  59. g_jbpacks[33],
  60. quitar[33],
  61. regalar[33],
  62. gidPlayer[33]
  63.  
  64.  
  65. /*============================================================
  66. Weapon Model's
  67. ============================================================*/
  68.  
  69.  
  70. new VIEW_MODELT[] = "models/jailbreak_shop/v_rabkez.mdl"
  71. new PLAYER_MODELT[] = "models/jailbreak_shop/p_rabkez.mdl"
  72.  
  73. new VIEW_MODELCT[] = "models/jailbreak_shop/v_sokkolo.mdl"
  74. new PLAYER_MODELCT[] = "models/jailbreak_shop/p_sokkolo.mdl"
  75.  
  76. new VIEW_Hacha[] = "models/jailbreak_shop/v_tortalapat.mdl"
  77. new PLAYER_Hacha[] = "models/jailbreak_shop/p_tortalapat.mdl"
  78.  
  79. new VIEW_Machete[] = "models/jailbreak_shop/v_fejsze.mdl"
  80. new PLAYER_Machete[] = "models/jailbreak_shop/p_fejsze.mdl"
  81.  
  82. new VIEW_Palo[] = "models/jailbreak_shop/v_wcpumpa.mdl"
  83. new PLAYER_Palo[] = "models/jailbreak_shop/p_wcpumpa.mdl"
  84.  
  85. new VIEW_Moto[] = "models/jailbreak_shop/v_lancfuresz.mdl"
  86. new PLAYER_Moto[] = "models/jailbreak_shop/p_lancfuresz.mdl"
  87.  
  88. new WORLD_MODEL[] = "models/w_knife.mdl"
  89. new OLDWORLD_MODEL[] = "models/w_knife.mdl"
  90.  
  91. /*============================================================
  92.   Shop Sounds!
  93. ============================================================*/
  94. new const Si[] = { "jailbreak_shop/Yes.wav" }
  95. new const No[] = { "jailbreak_shop/No.wav" }
  96.  
  97. /*============================================================
  98.   Weapon Sound's
  99. ============================================================*/
  100.  
  101. new const palo_deploy[] = { "weapons/knife_deploy1.wav" }
  102. new const palo_slash1[] = { "weapons/knife_slash1.wav" }
  103. new const palo_slash2[] = { "weapons/knife_slash2.wav" }
  104. new const palo_wall[] = { "jailbreak_shop/Palo/PHitWall.wav" }
  105. new const palo_hit1[] = { "jailbreak_shop/Palo/PHit1.wav" }
  106. new const palo_hit2[] = { "jailbreak_shop/Palo/PHit2.wav" }
  107. new const palo_hit3[] = { "jailbreak_shop/Palo/PHit3.wav" }
  108. new const palo_hit4[] = { "jailbreak_shop/Palo/PHit4.wav" }
  109. new const palo_stab[] = { "jailbreak_shop/Palo/PStab.wav" }
  110.  
  111. new const hacha_deploy[] = { "weapons/knife_deploy1.wav" }
  112. new const hacha_slash1[] = { "jailbreak_shop/Hacha/HSlash1.wav" }
  113. new const hacha_slash2[] = { "jailbreak_shop/Hacha/HSlash2.wav" }
  114. new const hacha_wall[] = { "jailbreak_shop/Hacha/HHitWall.wav" }
  115. new const hacha_hit1[] = { "jailbreak_shop/Hacha/HHit1.wav" }
  116. new const hacha_hit2[] = { "jailbreak_shop/Hacha/HHit2.wav" }
  117. new const hacha_hit3[] = { "jailbreak_shop/Hacha/HHit3.wav" }
  118. new const hacha_stab[] = { "jailbreak_shop/Hacha/HHit4.wav" }
  119.  
  120. new const machete_deploy[] = { "jailbreak_shop/Machete/MConvoca.wav" }
  121. new const machete_slash1[] = { "jailbreak_shop/Machete/MSlash1.wav" }
  122. new const machete_slash2[] = { "jailbreak_shop/Machete/MSlash2.wav" }
  123. new const machete_wall[] = { "jailbreak_shop/Machete/MHitWall.wav" }
  124. new const machete_hit1[] = { "jailbreak_shop/Machete/MHit1.wav" }
  125. new const machete_hit2[] = { "jailbreak_shop/Machete/MHit2.wav" }
  126. new const machete_hit3[] = { "jailbreak_shop/Machete/MHit3.wav" }
  127. new const machete_hit4[] = { "jailbreak_shop/Machete/MHit4.wav" }
  128. new const machete_stab[] = { "jailbreak_shop/Machete/MStab.wav" }
  129.  
  130. new const motocierra_deploy[] = { "jailbreak_shop/Moto/MTConvoca.wav", }
  131. new const motocierra_slash[] = { "jailbreak_shop/Moto/MTSlash.wav", }
  132. new const motocierra_wall[] = { "jailbreak_shop/Moto/MTHitWall.wav" }
  133. new const motocierra_hit1[] = { "jailbreak_shop/Moto/MTHit1.wav", }
  134. new const motocierra_hit2[] = { "jailbreak_shop/Moto/MTHit2.wav", }
  135. new const motocierra_stab[] = { "jailbreak_shop/Moto/MTStab.wav" }
  136.  
  137. new const t_deploy[] = { "jailbreak_shop/T/TConvoca.wav", }
  138. new const t_slash1[] = { "jailbreak_shop/T/Slash1.wav", }
  139. new const t_slash2[] = { "jailbreak_shop/T/Slash2.wav", }
  140. new const t_wall[] = { "jailbreak_shop/T/THitWall.wav" }
  141. new const t_hit1[] = { "jailbreak_shop/T/THit1.wav", }
  142. new const t_hit2[] = { "jailbreak_shop/T/THit2.wav", }
  143. new const t_hit3[] = { "jailbreak_shop/T/THit3.wav", }
  144. new const t_hit4[] = { "jailbreak_shop/T/THit4.wav", }
  145. new const t_stab[] = { "jailbreak_shop/T/TStab.wav" }
  146.  
  147. new const ct_deploy[] = { "jailbreak_shop/CT/CTConvoca.wav", }
  148. new const ct_slash1[] = { "jailbreak_shop/CT/Slash1.wav", }
  149. new const ct_slash2[] = { "jailbreak_shop/CT/Slash2.wav", }
  150. new const ct_wall[] = { "jailbreak_shop/CT/CTHitWall.wav" }
  151. new const ct_hit1[] = { "jailbreak_shop/CT/CTHit1.wav", }
  152. new const ct_hit2[] = { "jailbreak_shop/CT/CTHit2.wav", }
  153. new const ct_hit3[] = { "jailbreak_shop/CT/CTHit3.wav", }
  154. new const ct_hit4[] = { "jailbreak_shop/CT/CTHit4.wav", }
  155. new const ct_stab[] = { "jailbreak_shop/CT/CTStab.wav" }
  156.  
  157.  
  158. /*============================================================
  159. Config
  160. ============================================================*/
  161.  
  162. public plugin_init()
  163. {
  164.  
  165. register_plugin("[JB] Shop", "2.9", "[M]aNuC[s]_")
  166.  
  167. register_clcmd("say /bolt", "Tienda")
  168. register_clcmd("say !bolt", "Tienda")
  169. register_clcmd("say_team /bolt", "Tienda")
  170. register_clcmd("say_team !bolt", "Tienda")
  171.  
  172. register_clcmd("say /mg", "duel_menu", ADMIN_ALL)
  173. register_clcmd("say !mg", "duel_menu", ADMIN_ALL)
  174. register_clcmd("say_team /mg", "duel_menu", ADMIN_ALL)
  175. register_clcmd("say_team !mg", "duel_menu", ADMIN_ALL)
  176. register_clcmd("JailBreak Pontok", "player")
  177.  
  178. RegisterHam(Ham_Spawn, "player", "Fwd_PlayerSpawn_Post", 1)
  179. RegisterHam(Ham_TakeDamage, "player", "FwdTakeDamage", 0)
  180. RegisterHam(Ham_Killed, "player", "fw_player_killed")
  181.  
  182. register_event("CurWeapon", "Event_Change_Weapon", "be", "1=1")
  183.  
  184. register_forward(FM_SetModel, "fw_SetModel")
  185. register_forward(FM_EmitSound, "Fwd_EmitSound")
  186.  
  187. /*============================================================
  188. Cvar's
  189. ============================================================*/
  190. g_killjp = register_cvar("jb_killJP", "5");
  191. g_killhsjp = register_cvar("jb_bonushsJP", "2");
  192. g_startjp = register_cvar("jb_startJP", "10");
  193. g_maxjp = register_cvar("jb_maxgiveJP", "10000");
  194.  
  195. OnOff = register_cvar("jb_Shop", "1")//1(ON) 0(OFF)
  196. OnOff2 = register_cvar("jb_ShopKnifes", "1")//1(ON) 0(OFF)
  197. help = register_cvar("jb_help", "1")//1(ON) 0(OFF)
  198.  
  199. precio1 = register_cvar("jb_pFlash", "8")
  200. precio2 = register_cvar("jb_pHe", "11")
  201. precio3 = register_cvar("jb_pHEFL", "22")
  202. precio4 = register_cvar("jb_pWalk", "25")
  203. precio5 = register_cvar("jb_pFast", "28")
  204. precio6 = register_cvar("jb_pDrugs", "30")
  205. precio7 = register_cvar("jb_pGlock", "36")
  206.  
  207. precioC1 = register_cvar("jb_pKnife1", "5")
  208. precioC2 = register_cvar("jb_pKnife2", "20")
  209. precioC3 = register_cvar("jb_pKnife3", "25")
  210. precioC4 = register_cvar("jb_pKnife4", "36")
  211.  
  212. TDefaultDano = register_cvar("jb_dKnifeT", "20")
  213. CTDefaultDano = register_cvar("jb_dKnifeCT", "100")
  214. PaloDano = register_cvar("jb_dKnife1", "30")
  215. HachaDano = register_cvar("jb_dKnife2", "60")
  216. MacheteDano = register_cvar("jb_dKnife3", "80")
  217. MotocierraDano = register_cvar("jb_dKnife4", "200")
  218.  
  219. hTDefaultDano = register_cvar("jb_dHsKnifeT", "30")
  220. hCTDefaultDano = register_cvar("jb_dHsKnifeCT", "80")
  221. hPaloDano = register_cvar("jb_dhsKnife1", "45")
  222. hHachaDano = register_cvar("jb_dhsKnife2", "75")
  223. hMacheteDano = register_cvar("jb_dhsKnife3", "95")
  224.  
  225. Vida = register_cvar("jb_drLife", "200")
  226. Armor = register_cvar("jb_drArmor", "200")
  227.  
  228. glock1 = register_cvar("jb_gClip", "20")
  229. glock2 = register_cvar("jb_gAmmo", "0")
  230.  
  231. g_iMsgSayText = get_user_msgid("SayText")
  232. syncObj = CreateHudSyncObj()
  233.  
  234.  
  235. /*============================================================
  236. Multi Lengual!
  237. ============================================================*/
  238. register_dictionary("jbshop.txt")
  239. }
  240.  
  241. /*============================================================
  242. Precaches
  243. ============================================================*/
  244. public plugin_precache()
  245. {
  246. precache_sound(Si)
  247. precache_sound(No)
  248.  
  249. precache_sound(t_deploy)
  250. precache_sound(t_slash1)
  251. precache_sound(t_slash2)
  252. precache_sound(t_stab)
  253. precache_sound(t_wall)
  254. precache_sound(t_hit1)
  255. precache_sound(t_hit2)
  256. precache_sound(t_hit3)
  257. precache_sound(t_hit4)
  258.  
  259. precache_sound(ct_deploy)
  260. precache_sound(ct_slash1)
  261. precache_sound(ct_slash2)
  262. precache_sound(ct_stab)
  263. precache_sound(ct_wall)
  264. precache_sound(ct_hit1)
  265. precache_sound(ct_hit2)
  266. precache_sound(ct_hit3)
  267. precache_sound(ct_hit4)
  268.  
  269. precache_sound(palo_deploy)
  270. precache_sound(palo_slash1)
  271. precache_sound(palo_slash2)
  272. precache_sound(palo_stab)
  273. precache_sound(palo_wall)
  274. precache_sound(palo_hit1)
  275. precache_sound(palo_hit2)
  276. precache_sound(palo_hit3)
  277. precache_sound(palo_hit4)
  278.  
  279. precache_sound(machete_deploy)
  280. precache_sound(machete_slash1)
  281. precache_sound(machete_slash2)
  282. precache_sound(machete_stab)
  283. precache_sound(machete_wall)
  284. precache_sound(machete_hit1)
  285. precache_sound(machete_hit2)
  286. precache_sound(machete_hit3)
  287. precache_sound(machete_hit4)
  288.  
  289. precache_sound(hacha_deploy)
  290. precache_sound(hacha_slash1)
  291. precache_sound(hacha_slash2)
  292. precache_sound(hacha_stab)
  293. precache_sound(hacha_wall)
  294. precache_sound(hacha_hit1)
  295. precache_sound(hacha_hit2)
  296. precache_sound(hacha_hit3)
  297.  
  298. precache_sound(motocierra_deploy)
  299. precache_sound(motocierra_slash)
  300. precache_sound(motocierra_stab)
  301. precache_sound(motocierra_wall)
  302. precache_sound(motocierra_hit1)
  303. precache_sound(motocierra_hit2)
  304.  
  305.  
  306. precache_model(VIEW_MODELT)
  307. precache_model(PLAYER_MODELT)
  308. precache_model(VIEW_MODELCT)
  309. precache_model(PLAYER_MODELCT)
  310. precache_model(VIEW_Palo)
  311. precache_model(PLAYER_Palo)
  312. precache_model(VIEW_Hacha)
  313. precache_model(PLAYER_Hacha)
  314. precache_model(VIEW_Machete)
  315. precache_model(PLAYER_Machete)
  316. precache_model(VIEW_Moto)
  317. precache_model(PLAYER_Moto)
  318. precache_model(WORLD_MODEL)
  319.  
  320. return PLUGIN_CONTINUE
  321. }
  322.  
  323. /*============================================================
  324.   KNIFE SHOP
  325. ============================================================*/
  326. public Tienda1(id)
  327. {
  328. if(get_pcvar_num(OnOff2))
  329. {
  330. if (get_user_team(id) == 1 )
  331. {
  332. static Item[64]
  333.  
  334. formatex(Item, charsmax(Item),"\y%L", LANG_PLAYER, "SHOP")
  335. new Menu = menu_create(Item, "CuchilleroHandler")
  336.  
  337. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "KNIFE1", get_pcvar_num(precioC1))
  338. menu_additem(Menu, Item, "1")
  339.  
  340. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "KNIFE2", get_pcvar_num(precioC2))
  341. menu_additem(Menu, Item, "2")
  342.  
  343. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "KNIFE3", get_pcvar_num(precioC3))
  344. menu_additem(Menu, Item, "3")
  345.  
  346. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "KNIFE4", get_pcvar_num(precioC4))
  347. menu_additem(Menu, Item, "4")
  348.  
  349. menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
  350. menu_display(id, Menu)
  351. }
  352. }
  353. return PLUGIN_HANDLED
  354. }
  355.  
  356. public CuchilleroHandler(id, menu, item)
  357. {
  358. if( item == MENU_EXIT )
  359. {
  360. menu_destroy(menu);
  361. return PLUGIN_HANDLED;
  362. }
  363. new data[6], iName[64];
  364. new access, callback;
  365. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
  366.  
  367. new vivo = is_user_alive(id)
  368. new Obtener1 = get_pcvar_num(precioC1)
  369. new Obtener2 = get_pcvar_num(precioC2)
  370. new Obtener3 = get_pcvar_num(precioC3)
  371. new Obtener4 = get_pcvar_num(precioC4)
  372.  
  373. new key = str_to_num(data);
  374.  
  375. switch(key)
  376. {
  377. case 1:
  378. {
  379. if (g_jbpacks[id]>= Obtener1 && vivo)
  380. {
  381. g_jbpacks[id] -= Obtener1
  382. CTCuchillo[id] = 0
  383. TCuchillo[id] = 0
  384. Destapador[id] = 1
  385. Hacha[id] = 0
  386. Machete[id] = 0
  387. Motocierra[id] = 0
  388.  
  389.  
  390. ham_strip_weapon(id, "weapon_knife")
  391. give_item(id, "weapon_knife")
  392.  
  393. ChatColor(id, "%L", LANG_PLAYER, "BUY_KNIFE1")
  394. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  395. }
  396. else
  397. {
  398. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  399. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  400. }
  401. }
  402.  
  403. case 2:
  404. {
  405. if (g_jbpacks[id] >= Obtener2 && vivo)
  406. {
  407.  
  408. g_jbpacks[id] -= Obtener2
  409. CTCuchillo[id] = 0
  410. TCuchillo[id] = 0
  411. Destapador[id] = 0
  412. Hacha[id] = 1
  413. Machete[id] = 0
  414. Motocierra[id] = 0
  415.  
  416. ham_strip_weapon(id, "weapon_knife")
  417. give_item(id, "weapon_knife")
  418.  
  419. ChatColor(id, "%L", LANG_PLAYER, "BUY_KNIFE2")
  420. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  421. }
  422. else
  423. {
  424. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  425. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  426. }
  427. }
  428.  
  429. case 3:
  430. {
  431. if (g_jbpacks[id] >= Obtener3 && vivo)
  432. {
  433.  
  434. g_jbpacks[id] -= Obtener3
  435. CTCuchillo[id] = 0
  436. TCuchillo[id] = 0
  437. Destapador[id] = 0
  438. Hacha[id] = 0
  439. Machete[id] = 1
  440. Motocierra[id] = 0
  441.  
  442. ham_strip_weapon(id, "weapon_knife")
  443. give_item(id, "weapon_knife")
  444.  
  445. ChatColor(id, "%L", LANG_PLAYER, "BUY_KNIFE3")
  446. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  447. }
  448. else
  449. {
  450. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  451. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  452. }
  453. }
  454.  
  455. case 4:
  456. {
  457. if (g_jbpacks[id] >= Obtener4 && vivo)
  458. {
  459.  
  460. g_jbpacks[id] -= Obtener4
  461. CTCuchillo[id] = 0
  462. TCuchillo[id] = 0
  463. Destapador[id] = 0
  464. Hacha[id] = 0
  465. Machete[id] = 0
  466. Motocierra[id] = 1
  467.  
  468.  
  469. ham_strip_weapon(id, "weapon_knife")
  470. give_item(id, "weapon_knife")
  471.  
  472. ChatColor(id, "%L", LANG_PLAYER, "BUY_KNIFE4")
  473. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  474. }
  475. else
  476. {
  477. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  478. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  479. }
  480. }
  481. }
  482. menu_destroy(menu);
  483. return PLUGIN_HANDLED;
  484. }
  485.  
  486. /*============================================================
  487.   ITEM'S MENU
  488. ============================================================*/
  489. public Tienda(id)
  490. {
  491. if(get_pcvar_num(OnOff))
  492. {
  493. if(get_pcvar_num(OnOff) && Ronda[id])
  494. {
  495. if(is_user_alive(id))
  496. {
  497. if (cs_get_user_team(id) == CS_TEAM_T )
  498. {
  499. new contador=0;
  500. new players[32], num, tempid;
  501.  
  502. get_players(players, num)
  503.  
  504. for (new i=0; i<num; i++)
  505. {
  506. tempid = players[i]
  507.  
  508. if (get_user_team(tempid)==1 && is_user_alive(tempid))
  509. {
  510. contador++;
  511. }
  512. }
  513. if ( contador == 1 )
  514. {
  515. ChatColor(id, "%L", LANG_PLAYER, "LAST")
  516. }
  517. else if ( contador >= 2 )
  518. {
  519. static Item[64]
  520.  
  521. formatex(Item, charsmax(Item),"\y%L", LANG_PLAYER, "SHOP")
  522. new Menu = menu_create(Item, "TiendaHandler")
  523.  
  524. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "FLASH", get_pcvar_num(precio1))
  525. menu_additem(Menu, Item, "1")
  526.  
  527. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "HE", get_pcvar_num(precio2))
  528. menu_additem(Menu, Item, "2")
  529.  
  530. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "HEFLASH", get_pcvar_num(precio3))
  531. menu_additem(Menu, Item, "3")
  532.  
  533. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "FOOTSTEPS", get_pcvar_num(precio4))
  534. menu_additem(Menu, Item, "4")
  535.  
  536. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "SPEED", get_pcvar_num(precio5))
  537. menu_additem(Menu, Item, "5")
  538.  
  539. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "DRUGS", get_pcvar_num(precio6))
  540. menu_additem(Menu, Item, "6")
  541.  
  542. formatex(Item, charsmax(Item),"\w%L \r%d$",LANG_PLAYER, "GLOCK", get_pcvar_num(precio7))
  543. menu_additem(Menu, Item, "7")
  544.  
  545. menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
  546. menu_display(id, Menu)
  547. }
  548. }
  549. else
  550. {
  551. ChatColor(id, "%L", LANG_PLAYER, "ONLY")
  552. }
  553. }
  554. else
  555. {
  556. ChatColor(id, "%L", LANG_PLAYER, "DEAD")
  557. }
  558. }
  559. else
  560. {
  561. ChatColor(id, "%L", LANG_PLAYER, "ONE_TIME")
  562. }
  563. }
  564. else
  565. {
  566. ChatColor(id, "%L", LANG_PLAYER, "SHOP_OFF")
  567. }
  568. return PLUGIN_HANDLED
  569. }
  570.  
  571.  
  572. public TiendaHandler(id, menu, item)
  573. {
  574. if( item == MENU_EXIT )
  575. {
  576. menu_destroy(menu);
  577. return PLUGIN_HANDLED;
  578. }
  579. new data[6], iName[64];
  580. new access, callback;
  581. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
  582. new vivo = is_user_alive(id)
  583. new gmsg_SetFOV = get_user_msgid("SetFOV")
  584. new Obtener1 = get_pcvar_num(precio1)
  585. new Obtener2 = get_pcvar_num(precio2)
  586. new Obtener3 = get_pcvar_num(precio3)
  587. new Obtener4 = get_pcvar_num(precio4)
  588. new Obtener5 = get_pcvar_num(precio5)
  589. new Obtener6 = get_pcvar_num(precio6)
  590. new Obtener7 = get_pcvar_num(precio7)
  591. new vida1 = get_user_health(id)
  592. new vida2 = get_pcvar_num(Vida)
  593. new armor1 = get_user_armor(id)
  594. new armor2 = get_pcvar_num(Armor)
  595.  
  596. new key = str_to_num(data);
  597. switch(key)
  598. {
  599. case 1:
  600. {
  601. if (g_jbpacks[id] >= Obtener1 && vivo)
  602. {
  603. g_jbpacks[id] -= Obtener1
  604. ChatColor(id, "%L", LANG_PLAYER, "BUY_FLASH")
  605. give_item(id, "weapon_flashbang")
  606. give_item(id, "weapon_flashbang")
  607. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  608. Ronda[id] = 0
  609. }
  610. else
  611. {
  612. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  613. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  614. }
  615. }
  616. case 2:
  617. {
  618.  
  619. if (g_jbpacks[id] >= Obtener2 && vivo)
  620. {
  621. g_jbpacks[id] -= Obtener2
  622. ChatColor(id, "%L", LANG_PLAYER, "BUY_HE")
  623. give_item(id, "weapon_hegrenade")
  624. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  625. Ronda[id] = 0
  626. }
  627. else
  628. {
  629. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  630. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  631. }
  632. }
  633. case 3:
  634. {
  635.  
  636. if (g_jbpacks[id] >= Obtener3 && vivo)
  637. {
  638. g_jbpacks[id] -= Obtener3
  639. ChatColor(id, "%L", LANG_PLAYER, "BUY_HEFLASH")
  640. give_item(id, "weapon_hegrenade")
  641. give_item(id, "weapon_flashbang")
  642. give_item(id, "weapon_flashbang")
  643. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  644. Ronda[id] = 0
  645. }
  646. else
  647. {
  648. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  649. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  650. }
  651. }
  652. case 4:
  653. {
  654.  
  655. if (g_jbpacks[id] >= Obtener4 && vivo)
  656. {
  657. g_jbpacks[id] -= Obtener4
  658. ChatColor(id, "%L", LANG_PLAYER, "BUY_FOOTSTEPS")
  659. set_user_footsteps(id, 1)
  660. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  661. Ronda[id] = 0
  662. }
  663. else
  664. {
  665. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  666. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  667. }
  668. }
  669. case 5:
  670. {
  671. if (g_jbpacks[id] >= Obtener5 && vivo)
  672. {
  673. g_jbpacks[id] -= Obtener5
  674. ChatColor(id, "%L", LANG_PLAYER, "BUY_SPEED")
  675. set_user_maxspeed(id, 500.0)
  676. Speed[id] = 1
  677. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  678. Ronda[id] = 0
  679. }
  680. else
  681. {
  682. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  683. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  684. }
  685. }
  686. case 6:
  687. {
  688. if (g_jbpacks[id] >= Obtener6 && vivo)
  689. {
  690. g_jbpacks[id] -= Obtener6
  691. ChatColor(id, "%L", LANG_PLAYER, "BUY_DRUGS")
  692. set_user_armor(id, armor1 + armor2)
  693. set_user_health(id, vida1 + vida2)
  694. set_user_maxspeed(id, 380.0)
  695. Speed2[id] = 1
  696. message_begin( MSG_ONE, gmsg_SetFOV, { 0, 0, 0 }, id )
  697. write_byte( 180 )
  698. message_end( )
  699. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  700. Ronda[id] = 0
  701. }
  702. else
  703. {
  704. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  705. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  706. }
  707. }
  708. case 7:
  709. {
  710. if (g_jbpacks[id] >= Obtener7 && vivo)
  711. {
  712. g_jbpacks[id] -= Obtener7
  713. ChatColor(id, "%L", LANG_PLAYER, "BUY_GLOCK")
  714. cs_set_weapon_ammo( give_item( id, "weapon_glock18" ), get_pcvar_num(glock1))
  715. cs_set_user_bpammo(id, CSW_GLOCK18, get_pcvar_num(glock2))
  716. emit_sound(id, CHAN_AUTO, Si, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  717. Ronda[id] = 0
  718. }
  719. else
  720. {
  721. ChatColor(id, "%L", LANG_PLAYER, "MONEY")
  722. emit_sound(id, CHAN_AUTO, No, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
  723. }
  724. }
  725. }
  726. menu_destroy(menu);
  727. return PLUGIN_HANDLED;
  728. }
  729.  
  730. public client_putinserver(id)
  731. {
  732. g_jbpacks[id] = get_pcvar_num(g_startjp)
  733. set_task(1.0, "JailbreakPacks", id, _, _, "b")
  734. }
  735.  
  736. public JailbreakPacks(id)
  737. {
  738. set_hudmessage(142, 239, 39, 0.50, 0.90, 0, 6.0, 2.5)
  739. ShowSyncHudMsg(id, syncObj,"JBPacks: %i", g_jbpacks[id])
  740. }
  741.  
  742. public duel_menu(id)
  743. {
  744. if (!is_user_admin(id))
  745. {
  746. ChatColor(id, "%L", LANG_PLAYER, "CANT")
  747. return PLUGIN_HANDLED
  748. }
  749.  
  750. static opcion[64]
  751.  
  752. formatex(opcion, charsmax(opcion),"\y%L", LANG_PLAYER, "JBPACKS")
  753. new iMenu = menu_create(opcion, "menu")
  754.  
  755. formatex(opcion, charsmax(opcion),"\w%L", LANG_PLAYER, "GIVE_JBPACKS")
  756. menu_additem(iMenu, opcion, "1")
  757.  
  758. formatex(opcion, charsmax(opcion),"\w%L", LANG_PLAYER, "TAKE_JBPACKS")
  759. menu_additem(iMenu, opcion, "2")
  760.  
  761. menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
  762. menu_display(id, iMenu, 0)
  763.  
  764. return PLUGIN_HANDLED
  765. }
  766.  
  767. public menu(id, menu, item)
  768. {
  769.  
  770. if (item == MENU_EXIT)
  771. {
  772. menu_destroy(menu)
  773. return PLUGIN_HANDLED
  774. }
  775.  
  776. new Data[6], Name[64]
  777. new Access, Callback
  778.  
  779. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
  780.  
  781. new Key = str_to_num(Data)
  782.  
  783. switch (Key)
  784. {
  785. case 1:
  786. {
  787. regalar[id] = 1
  788. quitar[id] = 0
  789. escojer(id)
  790. }
  791. case 2:
  792. {
  793. quitar[id] = 1
  794. regalar[id] = 0
  795. escojer(id)
  796. }
  797. }
  798.  
  799. menu_destroy(menu)
  800. return PLUGIN_HANDLED
  801. }
  802.  
  803.  
  804. public escojer(id)
  805. {
  806. static opcion[64]
  807.  
  808. formatex(opcion, charsmax(opcion),"\y%L", LANG_PLAYER, "CHOOSE")
  809. new iMenu = menu_create(opcion, "choose")
  810.  
  811. new players[32], pnum, tempid
  812. new szName[32], szTempid[10]
  813.  
  814. get_players(players, pnum, "a")
  815.  
  816. for( new i; i<pnum; i++ )
  817. {
  818. tempid = players[i]
  819.  
  820. get_user_name(tempid, szName, 31)
  821. num_to_str(tempid, szTempid, 9)
  822.  
  823. formatex(opcion, charsmax(opcion), "\w%s \rJbPacks[%d]", szName, g_jbpacks[tempid])
  824. menu_additem(iMenu, opcion, szTempid, 0)
  825. }
  826.  
  827. menu_display(id, iMenu)
  828. return PLUGIN_HANDLED
  829. }
  830.  
  831. public choose(id, menu, item)
  832. {
  833. if( item == MENU_EXIT )
  834. {
  835. menu_destroy(menu)
  836. return PLUGIN_HANDLED
  837. }
  838.  
  839. new Data[6], Name[64]
  840. new Access, Callback
  841. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
  842.  
  843. new tempid = str_to_num(Data)
  844.  
  845. gidPlayer[id] = tempid
  846. client_cmd(id, "messagemode JbPacks")
  847.  
  848. menu_destroy(menu)
  849. return PLUGIN_HANDLED
  850. }
  851.  
  852. public player(id)
  853. {
  854. new say[300]
  855. read_args(say, charsmax(say))
  856.  
  857. remove_quotes(say)
  858.  
  859. if(!is_str_num(say) || equal(say, ""))
  860. return PLUGIN_HANDLED
  861.  
  862. jbpacks(id, say)
  863.  
  864. return PLUGIN_CONTINUE
  865. }
  866.  
  867. jbpacks(id, say[]) {
  868. new amount = str_to_num(say)
  869. new victim = gidPlayer[id]
  870.  
  871. new vname[32]
  872.  
  873. if(victim > 0)
  874. {
  875. get_user_name(victim, vname, 31)
  876.  
  877. if(regalar[id])
  878. {
  879. if(amount > get_pcvar_num(g_maxjp))
  880. {
  881. g_jbpacks[victim] = get_pcvar_num(g_maxjp)
  882. }
  883. else
  884. {
  885. g_jbpacks[victim] = g_jbpacks[victim] + amount
  886. }
  887. ChatColor(0, "%L", LANG_PLAYER, "GIVE_MSG", amount, vname)
  888. }
  889. if(quitar[id])
  890. {
  891. if(amount > g_jbpacks[victim])
  892. {
  893. g_jbpacks[victim] = 0
  894. ChatColor(0, "%L", LANG_PLAYER, "TAKE_ALL", vname)
  895. }
  896. else
  897. {
  898. g_jbpacks[victim] = g_jbpacks[victim] - amount
  899. ChatColor(0, "%L", LANG_PLAYER, "TAKE_MSG", amount, vname)
  900. }
  901.  
  902. }
  903. }
  904.  
  905. return PLUGIN_HANDLED
  906. }
  907.  
  908. public Fwd_PlayerSpawn_Post(id)
  909. {
  910. if (is_user_alive(id))
  911. {
  912. if(get_user_team(id) == 1) strip_user_weapons(id); give_item(id, "weapon_knife")
  913.  
  914. set_user_footsteps(id, 0)
  915. Speed[id] = 0
  916. Speed2[id] = 0
  917. Ronda[id] = 1
  918. CTCuchillo[id] = 1
  919. TCuchillo[id] = 1
  920. Destapador[id] = 0
  921. Hacha[id] = 0
  922. Machete[id] = 0
  923. Motocierra[id] = 0
  924. Tienda1(id)
  925. if(get_pcvar_num(help)) ChatColor(id, "%L", LANG_PLAYER, "HELP")
  926. }
  927. }
  928.  
  929. public FwdTakeDamage(victim, inflictor, attacker, Float:damage, damage_bits)
  930. {
  931.  
  932. if (is_valid_player(attacker) && get_user_weapon(attacker) == CSW_KNIFE)
  933. {
  934. switch(get_user_team(attacker))
  935. {
  936. case 1:
  937. {
  938. if(TCuchillo[attacker])
  939. {
  940.  
  941. SetHamParamFloat(4, get_pcvar_float(TDefaultDano))
  942.  
  943. if(get_pdata_int(victim, 75) == HIT_HEAD)
  944. {
  945. SetHamParamFloat(4, get_pcvar_float(hTDefaultDano))
  946. }
  947. }
  948.  
  949. if(Destapador[attacker])
  950. {
  951. SetHamParamFloat(4, get_pcvar_float(PaloDano))
  952.  
  953. if(get_pdata_int(victim, 75) == HIT_HEAD)
  954. {
  955. SetHamParamFloat(4, get_pcvar_float(hPaloDano))
  956. }
  957. }
  958.  
  959. if(Hacha[attacker])
  960. {
  961. SetHamParamFloat(4, get_pcvar_float(HachaDano))
  962.  
  963. if(get_pdata_int(victim, 75) == HIT_HEAD)
  964. {
  965. SetHamParamFloat(4, get_pcvar_float(hHachaDano))
  966. }
  967. }
  968.  
  969. if(Machete[attacker])
  970. {
  971. SetHamParamFloat(4, get_pcvar_float(MacheteDano))
  972.  
  973. if(get_pdata_int(victim, 75) == HIT_HEAD)
  974. {
  975. SetHamParamFloat(4, get_pcvar_float(hMacheteDano))
  976. }
  977. }
  978.  
  979. if(Motocierra[attacker])
  980. {
  981. SetHamParamFloat(4, get_pcvar_float(MotocierraDano))
  982. }
  983. }
  984. case 2:
  985. {
  986. if(CTCuchillo[attacker])
  987. {
  988. SetHamParamFloat(4, get_pcvar_float(CTDefaultDano))
  989.  
  990. if(get_pdata_int(victim, 75) == HIT_HEAD)
  991. {
  992. SetHamParamFloat(4, get_pcvar_float(hCTDefaultDano))
  993. }
  994. }
  995. }
  996. }
  997. }
  998. return HAM_HANDLED
  999. }
  1000.  
  1001. public fw_player_killed(victim, attacker, shouldgib)
  1002. {
  1003. if(get_user_team(attacker) == 1)
  1004. {
  1005. g_jbpacks[attacker] += get_pcvar_num(g_killjp)
  1006.  
  1007. if(get_pdata_int(victim, 75) == HIT_HEAD)
  1008. {
  1009. g_jbpacks[attacker] += get_pcvar_num(g_killhsjp)
  1010. }
  1011. }
  1012. }
  1013.  
  1014.  
  1015. public Event_Change_Weapon(id)
  1016. {
  1017. new weaponID = read_data(2)
  1018.  
  1019. switch (get_user_team(id))
  1020. {
  1021. case 1:
  1022. {
  1023. if(Speed[id])
  1024. {
  1025. set_user_maxspeed(id, 500.0)
  1026. }
  1027.  
  1028. if(Speed2[id])
  1029. {
  1030. set_user_maxspeed(id, 380.0)
  1031. }
  1032.  
  1033. if(weaponID == CSW_KNIFE && get_pcvar_num(OnOff2))
  1034. {
  1035. if(TCuchillo[id])
  1036. {
  1037. set_pev(id, pev_viewmodel2, VIEW_MODELT)
  1038. set_pev(id, pev_weaponmodel2, PLAYER_MODELT)
  1039. }
  1040.  
  1041. if(Destapador[id])
  1042. {
  1043. set_pev(id, pev_viewmodel2, VIEW_Palo)
  1044. set_pev(id, pev_weaponmodel2, PLAYER_Palo)
  1045. }
  1046.  
  1047. if(Hacha[id])
  1048. {
  1049. set_pev(id, pev_viewmodel2, VIEW_Hacha)
  1050. set_pev(id, pev_weaponmodel2, PLAYER_Hacha)
  1051. }
  1052.  
  1053. if(Machete[id])
  1054. {
  1055. set_pev(id, pev_viewmodel2, VIEW_Machete)
  1056. set_pev(id, pev_weaponmodel2, PLAYER_Machete)
  1057. }
  1058.  
  1059. if(Motocierra[id])
  1060. {
  1061. set_pev(id, pev_viewmodel2, VIEW_Moto)
  1062. set_pev(id, pev_weaponmodel2, PLAYER_Moto)
  1063. }
  1064.  
  1065.  
  1066. }
  1067. }
  1068. case 2:
  1069. {
  1070. if(CTCuchillo[id] && weaponID == CSW_KNIFE)
  1071. {
  1072. set_pev(id, pev_viewmodel2, VIEW_MODELCT)
  1073. set_pev(id, pev_weaponmodel2, PLAYER_MODELCT)
  1074. }
  1075. }
  1076. }
  1077. return PLUGIN_CONTINUE
  1078. }
  1079.  
  1080. public fw_SetModel(entity, model[])
  1081. {
  1082. if(!pev_valid(entity))
  1083. return FMRES_IGNORED
  1084.  
  1085. if(!equali(model, OLDWORLD_MODEL))
  1086. return FMRES_IGNORED
  1087.  
  1088. new className[33]
  1089. pev(entity, pev_classname, className, 32)
  1090.  
  1091. if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
  1092. {
  1093. engfunc(EngFunc_SetModel, entity, WORLD_MODEL)
  1094. return FMRES_SUPERCEDE
  1095. }
  1096. return FMRES_IGNORED
  1097. }
  1098.  
  1099. public Fwd_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
  1100. {
  1101.  
  1102. if (!is_user_connected(id))
  1103. return FMRES_IGNORED;
  1104.  
  1105. if(CTCuchillo[id])
  1106. {
  1107. if(get_user_team(id) == 2)
  1108. {
  1109. if (equal(sample[8], "kni", 3))
  1110. {
  1111. if (equal(sample[14], "sla", 3))
  1112. {
  1113. switch (random_num(1, 2))
  1114. {
  1115. case 1: engfunc(EngFunc_EmitSound, id, channel, ct_slash1, volume, attn, flags, pitch)
  1116. case 2: engfunc(EngFunc_EmitSound, id, channel, ct_slash2, volume, attn, flags, pitch)
  1117. }
  1118.  
  1119. return FMRES_SUPERCEDE;
  1120. }
  1121. if(equal(sample,"weapons/knife_deploy1.wav"))
  1122. {
  1123. engfunc(EngFunc_EmitSound, id, channel, ct_deploy, volume, attn, flags, pitch)
  1124. return FMRES_SUPERCEDE;
  1125. }
  1126. if (equal(sample[14], "hit", 3))
  1127. {
  1128. if (sample[17] == 'w')
  1129. {
  1130. engfunc(EngFunc_EmitSound, id, channel, ct_wall, volume, attn, flags, pitch)
  1131. return FMRES_SUPERCEDE;
  1132. }
  1133. else
  1134. {
  1135. switch (random_num(1, 4))
  1136. {
  1137. case 1: engfunc(EngFunc_EmitSound, id, channel, ct_hit1, volume, attn, flags, pitch)
  1138. case 2: engfunc(EngFunc_EmitSound, id, channel, ct_hit2, volume, attn, flags, pitch)
  1139. case 3: engfunc(EngFunc_EmitSound, id, channel, ct_hit3, volume, attn, flags, pitch)
  1140. case 4: engfunc(EngFunc_EmitSound, id, channel, ct_hit4, volume, attn, flags, pitch)
  1141. }
  1142.  
  1143. return FMRES_SUPERCEDE;
  1144. }
  1145. }
  1146. if (equal(sample[14], "sta", 3))
  1147. {
  1148. engfunc(EngFunc_EmitSound, id, channel, ct_stab, volume, attn, flags, pitch)
  1149. return FMRES_SUPERCEDE;
  1150. }
  1151. }
  1152. }
  1153. }
  1154.  
  1155. if(TCuchillo[id])
  1156. {
  1157. if(get_user_team(id) == 1)
  1158. {
  1159. if (equal(sample[8], "kni", 3))
  1160. {
  1161. if (equal(sample[14], "sla", 3))
  1162. {
  1163. switch (random_num(1, 2))
  1164. {
  1165. case 1: engfunc(EngFunc_EmitSound, id, channel, t_slash1, volume, attn, flags, pitch)
  1166. case 2: engfunc(EngFunc_EmitSound, id, channel, t_slash2, volume, attn, flags, pitch)
  1167. }
  1168.  
  1169. return FMRES_SUPERCEDE;
  1170. }
  1171. if(equal(sample,"weapons/knife_deploy1.wav"))
  1172. {
  1173. engfunc(EngFunc_EmitSound, id, channel, t_deploy, volume, attn, flags, pitch)
  1174. return FMRES_SUPERCEDE;
  1175. }
  1176. if (equal(sample[14], "hit", 3))
  1177. {
  1178. if (sample[17] == 'w')
  1179. {
  1180. engfunc(EngFunc_EmitSound, id, channel, t_wall, volume, attn, flags, pitch)
  1181. return FMRES_SUPERCEDE;
  1182. }
  1183. else
  1184. {
  1185. switch (random_num(1, 4))
  1186. {
  1187. case 1: engfunc(EngFunc_EmitSound, id, channel, t_hit1, volume, attn, flags, pitch)
  1188. case 2: engfunc(EngFunc_EmitSound, id, channel, t_hit2, volume, attn, flags, pitch)
  1189. case 3: engfunc(EngFunc_EmitSound, id, channel, t_hit3, volume, attn, flags, pitch)
  1190. case 4: engfunc(EngFunc_EmitSound, id, channel, t_hit4, volume, attn, flags, pitch)
  1191. }
  1192.  
  1193. return FMRES_SUPERCEDE;
  1194. }
  1195. }
  1196. if (equal(sample[14], "sta", 3))
  1197. {
  1198. engfunc(EngFunc_EmitSound, id, channel, t_stab, volume, attn, flags, pitch)
  1199. return FMRES_SUPERCEDE;
  1200. }
  1201. }
  1202. }
  1203. }
  1204.  
  1205. if(Destapador[id])
  1206. {
  1207. if (equal(sample[8], "kni", 3))
  1208. {
  1209. if (equal(sample[14], "sla", 3))
  1210. {
  1211. switch (random_num(1, 2))
  1212. {
  1213. case 1: engfunc(EngFunc_EmitSound, id, channel, palo_slash1, volume, attn, flags, pitch)
  1214. case 2: engfunc(EngFunc_EmitSound, id, channel, palo_slash2, volume, attn, flags, pitch)
  1215.  
  1216. }
  1217.  
  1218. return FMRES_SUPERCEDE;
  1219. }
  1220. if(equal(sample,"weapons/knife_deploy1.wav"))
  1221. {
  1222. engfunc(EngFunc_EmitSound, id, channel, palo_deploy, volume, attn, flags, pitch)
  1223. return FMRES_SUPERCEDE;
  1224. }
  1225. if (equal(sample[14], "hit", 3))
  1226. {
  1227. if (sample[17] == 'w')
  1228. {
  1229. engfunc(EngFunc_EmitSound, id, channel, palo_wall, volume, attn, flags, pitch)
  1230. return FMRES_SUPERCEDE;
  1231. }
  1232. else
  1233. {
  1234. switch (random_num(1, 4))
  1235. {
  1236. case 1:engfunc(EngFunc_EmitSound, id, channel, palo_hit1, volume, attn, flags, pitch)
  1237. case 2:engfunc(EngFunc_EmitSound, id, channel, palo_hit2, volume, attn, flags, pitch)
  1238. case 3:engfunc(EngFunc_EmitSound, id, channel, palo_hit3, volume, attn, flags, pitch)
  1239. case 4:engfunc(EngFunc_EmitSound, id, channel, palo_hit4, volume, attn, flags, pitch)
  1240. }
  1241.  
  1242. return FMRES_SUPERCEDE;
  1243. }
  1244. }
  1245. if (equal(sample[14], "sta", 3))
  1246. {
  1247. engfunc(EngFunc_EmitSound, id, channel, palo_stab, volume, attn, flags, pitch)
  1248. return FMRES_SUPERCEDE;
  1249. }
  1250. }
  1251. }
  1252.  
  1253. if(Hacha[id])
  1254. {
  1255.  
  1256. if (equal(sample[8], "kni", 3))
  1257. {
  1258. if (equal(sample[14], "sla", 3))
  1259. {
  1260. switch (random_num(1, 2))
  1261. {
  1262. case 1: engfunc(EngFunc_EmitSound, id, channel, hacha_slash1, volume, attn, flags, pitch)
  1263. case 2: engfunc(EngFunc_EmitSound, id, channel, hacha_slash2, volume, attn, flags, pitch)
  1264. }
  1265.  
  1266. return FMRES_SUPERCEDE;
  1267. }
  1268. if(equal(sample,"weapons/knife_deploy1.wav"))
  1269. {
  1270. engfunc(EngFunc_EmitSound, id, channel, hacha_deploy, volume, attn, flags, pitch)
  1271. return FMRES_SUPERCEDE;
  1272. }
  1273. if (equal(sample[14], "hit", 3))
  1274. {
  1275. if (sample[17] == 'w')
  1276. {
  1277. engfunc(EngFunc_EmitSound, id, channel, hacha_wall, volume, attn, flags, pitch)
  1278. return FMRES_SUPERCEDE;
  1279. }
  1280. else
  1281. {
  1282. switch (random_num(1, 3))
  1283. {
  1284. case 1: engfunc(EngFunc_EmitSound, id, channel, hacha_hit1, volume, attn, flags, pitch)
  1285. case 2: engfunc(EngFunc_EmitSound, id, channel, hacha_hit2, volume, attn, flags, pitch)
  1286. case 3: engfunc(EngFunc_EmitSound, id, channel, hacha_hit3, volume, attn, flags, pitch)
  1287. }
  1288.  
  1289. return FMRES_SUPERCEDE;
  1290. }
  1291. }
  1292. if (equal(sample[14], "sta", 3))
  1293. {
  1294. engfunc(EngFunc_EmitSound, id, channel, hacha_stab, volume, attn, flags, pitch)
  1295. return FMRES_SUPERCEDE;
  1296. }
  1297. }
  1298. }
  1299.  
  1300. if(Machete[id])
  1301. {
  1302. if (equal(sample[8], "kni", 3))
  1303. {
  1304. if (equal(sample[14], "sla", 3))
  1305. {
  1306. switch (random_num(1, 2))
  1307. {
  1308. case 1: engfunc(EngFunc_EmitSound, id, channel, machete_slash1, volume, attn, flags, pitch)
  1309. case 2: engfunc(EngFunc_EmitSound, id, channel, machete_slash2, volume, attn, flags, pitch)
  1310. }
  1311. return FMRES_SUPERCEDE;
  1312. }
  1313. if(equal(sample,"weapons/knife_deploy1.wav"))
  1314. {
  1315. engfunc(EngFunc_EmitSound, id, channel, machete_deploy, volume, attn, flags, pitch)
  1316. return FMRES_SUPERCEDE;
  1317. }
  1318. if (equal(sample[14], "hit", 3))
  1319. {
  1320. if (sample[17] == 'w')
  1321. {
  1322. engfunc(EngFunc_EmitSound, id, channel, machete_wall, volume, attn, flags, pitch)
  1323. return FMRES_SUPERCEDE;
  1324. }
  1325. else // hit
  1326. {
  1327. switch (random_num(1, 4))
  1328. {
  1329. case 1: engfunc(EngFunc_EmitSound, id, channel, machete_hit1, volume, attn, flags, pitch)
  1330. case 2: engfunc(EngFunc_EmitSound, id, channel, machete_hit2, volume, attn, flags, pitch)
  1331. case 3: engfunc(EngFunc_EmitSound, id, channel, machete_hit3, volume, attn, flags, pitch)
  1332. case 4: engfunc(EngFunc_EmitSound, id, channel, machete_hit4, volume, attn, flags, pitch)
  1333. }
  1334. return FMRES_SUPERCEDE;
  1335. }
  1336. }
  1337. if (equal(sample[14], "sta", 3))
  1338. {
  1339. engfunc(EngFunc_EmitSound, id, channel, machete_stab, volume, attn, flags, pitch)
  1340. return FMRES_SUPERCEDE;
  1341. }
  1342. }
  1343. }
  1344.  
  1345. if(Motocierra[id])
  1346. {
  1347.  
  1348. if (equal(sample[8], "kni", 3))
  1349. {
  1350. if (equal(sample[14], "sla", 3))
  1351. {
  1352. engfunc(EngFunc_EmitSound, id, channel, motocierra_slash, volume, attn, flags, pitch)
  1353. return FMRES_SUPERCEDE;
  1354. }
  1355. if(equal(sample,"weapons/knife_deploy1.wav"))
  1356. {
  1357. engfunc(EngFunc_EmitSound, id, channel, motocierra_deploy, volume, attn, flags, pitch)
  1358. return FMRES_SUPERCEDE;
  1359. }
  1360. if (equal(sample[14], "hit", 3))
  1361. {
  1362. if (sample[17] == 'w')
  1363. {
  1364. engfunc(EngFunc_EmitSound, id, channel, motocierra_wall, volume, attn, flags, pitch)
  1365. return FMRES_SUPERCEDE;
  1366. }
  1367. else
  1368. {
  1369. switch (random_num(1, 2))
  1370. {
  1371. case 1: engfunc(EngFunc_EmitSound, id, channel, motocierra_hit1, volume, attn, flags, pitch)
  1372. case 2: engfunc(EngFunc_EmitSound, id, channel, motocierra_hit2, volume, attn, flags, pitch)
  1373.  
  1374. }
  1375. return FMRES_SUPERCEDE;
  1376. }
  1377. }
  1378. if (equal(sample[14], "sta", 3))
  1379. {
  1380. engfunc(EngFunc_EmitSound, id, channel, motocierra_stab, volume, attn, flags, pitch)
  1381. return FMRES_SUPERCEDE;
  1382. }
  1383. }
  1384. }
  1385. return FMRES_IGNORED;
  1386. }
  1387.  
  1388. /*============================================================
  1389.   Stocks!
  1390. ============================================================*/
  1391. stock ChatColor(const id, const input[], any:...)
  1392. {
  1393. new count = 1, players[32]
  1394. static msg[191]
  1395. vformat(msg, 190, input, 3)
  1396.  
  1397. replace_all(msg, 190, "!g", "^4") // Green Color
  1398. replace_all(msg, 190, "!y", "^1") // Default Color
  1399. replace_all(msg, 190, "!team", "^3") // Team Color
  1400.  
  1401.  
  1402. if (id) players[0] = id; else get_players(players, count, "ch")
  1403. {
  1404. for (new i = 0; i < count; i++)
  1405. {
  1406. if (is_user_connected(players[i]))
  1407. {
  1408. message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText, _, players[i])
  1409. write_byte(players[i]);
  1410. write_string(msg);
  1411. message_end();
  1412. }
  1413. }
  1414. }
  1415. }
  1416.  
  1417. stock ham_strip_weapon(id,weapon[])
  1418. {
  1419. if(!equal(weapon,"weapon_",7)) return 0;
  1420.  
  1421. new wId = get_weaponid(weapon);
  1422. if(!wId) return 0;
  1423.  
  1424. new wEnt;
  1425. while((wEnt = engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}
  1426. if(!wEnt) return 0;
  1427.  
  1428. if(get_user_weapon(id) == wId) ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
  1429.  
  1430. if(!ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;
  1431. ExecuteHamB(Ham_Item_Kill,wEnt);
  1432.  
  1433. set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));
  1434.  
  1435. return 1;
  1436. }
  1437. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  1438. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  1439. */


Köszi ,és még megkérhetnélek arra ,hogy ha valaki fegyvert akar venni akkor szerver kiirná ezt:
Ct: Sajnos, tilos a fegyver sokkolót használj (100 sebzés).
T:Sajnos raboknak tilos a fegyver...
Szóval arra akarok kijukadni le kéne tiltani a fegyvereket a szerverről...


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 5 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 29 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole