hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.06.03. 17:06



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: Google [Bot] 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  [ 3 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Hang a modellhez
HozzászólásElküldve: 2015.10.10. 08:24 
Offline
Senior Tag
Avatar

Csatlakozott: 2013.11.12. 16:39
Hozzászólások: 258
Megköszönt másnak: 87 alkalommal
Megköszönték neki: 2 alkalommal
Hangot akartam hozáadni a modelhez , de nem sikerült. A hiba : 646 sorban van

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #include <amxmisc>
  4.  
  5. #include <fun>
  6.  
  7. #include <engine>
  8.  
  9. #include <hamsandwich>
  10.  
  11. #include <colorchat>
  12.  
  13.  
  14.  
  15. #define PLUGIN "Bolt"
  16.  
  17. #define VERSION "1.0"
  18.  
  19. #define AUTHOR "Charlie224"
  20.  
  21.  
  22.  
  23. new g_pontok[33];
  24.  
  25. new bool:g_csavar[33];
  26.  
  27. new bool:g_baseball[33];
  28.  
  29. new bool:g_gumibot[33];
  30.  
  31. new shop1;
  32.  
  33. new shop2;
  34.  
  35. new shop3;
  36.  
  37. new shop4;
  38.  
  39. new syncObjp;
  40.  
  41. new bool:g_hp;
  42.  
  43. new Machete[33]
  44.  
  45.  
  46. new VIEW_MODELCSAVAR[] = "models/v_csavarhuzo.mdl";
  47.  
  48. new PLAYER_MODELCSAVAR[] = "models/p_csavarhuzo.mdl";
  49.  
  50. new VIEW_MODELBASEBALL[] = "models/v_baseballuto.mdl";
  51.  
  52. new PLAYER_MODELBASEBALL[] = "models/p_baseballuto.mdl";
  53.  
  54. new VIEW_MODELGUMIBOT[] = "models/v_gumibot.mdl";
  55.  
  56. new PLAYER_MODELGUMIBOT[] = "models/p_gumibot.mdl";
  57.  
  58. new const machete_slash1[] = { "[Shop]JailBreak/Machete/MSlash1.wav" }
  59. new const machete_slash2[] = { "[Shop]JailBreak/Machete/MSlash2.wav" }
  60.  
  61.  
  62.  
  63. public plugin_init()
  64.  
  65. {
  66.  
  67. register_plugin(PLUGIN, VERSION, AUTHOR);
  68.  
  69.  
  70.  
  71. register_event("DeathMsg", "Death", "a");
  72.  
  73. register_event("CurWeapon", "Change_Weapon", "be", "1=1");
  74.  
  75. register_logevent("Event_Roundend", 2, "1=Round_End")
  76.  
  77. register_logevent("Start", 2, "1=Round_Start")
  78.  
  79.  
  80.  
  81. register_clcmd("say /bolt", "boltmenu");
  82.  
  83.  
  84.  
  85. RegisterHam(Ham_Spawn, "player", "PlayerSpawn", 1);
  86.  
  87. RegisterHam(Ham_TakeDamage, "player", "TakeDamage", 0);
  88.  
  89.  
  90.  
  91. shop1 = register_cvar("shop_1", "15");
  92.  
  93. shop2 = register_cvar("shop_2", "10");
  94.  
  95. shop3 = register_cvar("shop_3", "20");
  96.  
  97. shop4 = register_cvar("shop_4", "5");
  98.  
  99. syncObjp = CreateHudSyncObj();
  100.  
  101. }
  102.  
  103. public plugin_precache()
  104.  
  105. {
  106.  
  107. precache_model(VIEW_MODELCSAVAR);
  108.  
  109. precache_model(PLAYER_MODELCSAVAR);
  110.  
  111. precache_model(VIEW_MODELBASEBALL);
  112.  
  113. precache_model(PLAYER_MODELBASEBALL);
  114.  
  115. precache_model(VIEW_MODELGUMIBOT);
  116.  
  117. precache_model(PLAYER_MODELGUMIBOT);
  118.  
  119. }
  120.  
  121. public Start(id)
  122.  
  123. {
  124.  
  125. g_hp = true;
  126.  
  127. }
  128.  
  129. public Event_Roundend()
  130.  
  131. {
  132.  
  133. new players[32], pnum, tempid;
  134.  
  135. get_players(players, pnum, "c");
  136.  
  137.  
  138.  
  139. for(new i; i<pnum; i++)
  140.  
  141. {
  142.  
  143. tempid = players[i];
  144.  
  145. g_csavar[tempid] = false;
  146.  
  147. g_baseball[tempid] = false;
  148.  
  149. g_gumibot[tempid] = false;
  150.  
  151. }
  152.  
  153. }
  154.  
  155. public Death()
  156.  
  157. {
  158.  
  159. new id = read_data(2);
  160.  
  161. new attacker = read_data(1);
  162.  
  163.  
  164.  
  165. if(!is_user_alive(attacker))
  166.  
  167. return PLUGIN_CONTINUE;
  168.  
  169.  
  170.  
  171. if(get_user_team(id) != get_user_team(attacker))
  172.  
  173. {
  174.  
  175. g_pontok[attacker]+=5;
  176.  
  177. }
  178.  
  179.  
  180.  
  181. return PLUGIN_CONTINUE;
  182.  
  183. }
  184.  
  185. public boltmenu(id)
  186.  
  187. {
  188.  
  189. if(get_user_team(id) == 1)
  190.  
  191. {
  192.  
  193. if(is_user_alive(id))
  194.  
  195. {
  196.  
  197. static opcion[64];
  198.  
  199.  
  200.  
  201. formatex(opcion, charsmax(opcion),"\y[JailBreak Bolt] [Beta] v0.1");
  202.  
  203. new iMenu = menu_create(opcion, "boltmenuh");
  204.  
  205.  
  206.  
  207. formatex(opcion, charsmax(opcion),"\w+50 HP(1 korben 1x) \r%d pont", get_pcvar_num(shop4));
  208.  
  209. formatex(opcion, charsmax(opcion),"\wBaseballuto(75 Sebzes) \r%d pont", get_pcvar_num(shop2));
  210.  
  211. formatex(opcion, charsmax(opcion),"\wCsavarhuzo(100 Sebzes) \r%d pont", get_pcvar_num(shop1));
  212.  
  213. menu_additem(iMenu, opcion, "3");
  214.  
  215.  
  216.  
  217. menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL);
  218.  
  219. menu_display(id, iMenu, 0);
  220.  
  221. }
  222.  
  223. else
  224.  
  225. {
  226.  
  227. ColorChat(id, GREEN, "[JailBreak Bolt] [Beta] Csak elok hasznalhatjak a boltot");
  228.  
  229. }
  230.  
  231. }
  232.  
  233. else if(get_user_team(id) == 2)
  234.  
  235. {
  236.  
  237. if(is_user_alive(id))
  238.  
  239. {
  240.  
  241. static opcion[64];
  242.  
  243.  
  244.  
  245. formatex(opcion, charsmax(opcion),"\y[JailBreak Bolt] [Beta] v0.1");
  246.  
  247. new iMenu2 = menu_create(opcion, "boltmenuh2");
  248.  
  249.  
  250.  
  251. formatex(opcion, charsmax(opcion),"\w+50 HP(1 korben 1x) \r%d pont", get_pcvar_num(shop4));
  252.  
  253. formatex(opcion, charsmax(opcion),"\wGumibot(100 Sebzes) \r%d pont", get_pcvar_num(shop3));
  254.  
  255. menu_additem(iMenu2, opcion, "2");
  256.  
  257.  
  258.  
  259. menu_setprop(iMenu2, MPROP_EXIT, MEXIT_ALL);
  260.  
  261. menu_display(id, iMenu2, 0);
  262.  
  263. }
  264.  
  265. else
  266.  
  267. {
  268.  
  269. ColorChat(id, GREEN, "[JailBreak Bolt] [Beta] Csak elok hasznalhatjak a boltot");
  270.  
  271. }
  272.  
  273. }
  274.  
  275.  
  276.  
  277. return PLUGIN_HANDLED;
  278.  
  279. }
  280.  
  281.  
  282.  
  283. public boltmenuh(id, menu, item)
  284.  
  285. {
  286.  
  287.  
  288.  
  289. if (item == MENU_EXIT)
  290.  
  291. {
  292.  
  293. menu_destroy(menu);
  294.  
  295. return PLUGIN_HANDLED;
  296.  
  297. }
  298.  
  299.  
  300.  
  301. new Data[6], Name[64];
  302.  
  303. new Access, Callback;
  304.  
  305.  
  306.  
  307. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback);
  308.  
  309.  
  310.  
  311. new elo = is_user_alive(id);
  312.  
  313. new item_ar1 = get_pcvar_num(shop1);
  314.  
  315. new item_ar2 = get_pcvar_num(shop2);
  316.  
  317. new item_ar4 = get_pcvar_num(shop4);
  318.  
  319. new health = get_user_health(id)
  320.  
  321.  
  322.  
  323. new Key = str_to_num(Data);
  324.  
  325.  
  326.  
  327. switch (Key)
  328.  
  329. {
  330.  
  331. case 1:
  332.  
  333. {
  334.  
  335. if (g_pontok[id]>= item_ar4 && elo)
  336.  
  337. {
  338.  
  339. if(g_hp)
  340.  
  341. {
  342.  
  343. g_pontok[id] -= item_ar4;
  344.  
  345. set_user_health(id, health+50)
  346.  
  347. g_hp = false;
  348.  
  349. }
  350.  
  351. else
  352.  
  353. {
  354.  
  355. ColorChat(id, GREEN, "[JailBreak Bolt] [Beta] Mar vettel 1x HP -t!");
  356.  
  357. }
  358.  
  359. }
  360.  
  361. }
  362.  
  363. case 2:
  364.  
  365. {
  366.  
  367. if (g_pontok[id]>= item_ar2 && elo)
  368.  
  369. {
  370.  
  371. g_pontok[id] -= item_ar2;
  372.  
  373. g_baseball[id] = true;
  374.  
  375. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELBASEBALL);
  376.  
  377. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELBASEBALL);
  378.  
  379. }
  380.  
  381. }
  382.  
  383. case 3:
  384.  
  385. {
  386.  
  387. if (g_pontok[id]>= item_ar1 && elo)
  388.  
  389. {
  390.  
  391. g_pontok[id] -= item_ar1;
  392.  
  393. g_csavar[id] = true;
  394.  
  395. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELCSAVAR);
  396.  
  397. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELCSAVAR);
  398.  
  399. Machete[id] = 0
  400.  
  401.  
  402.  
  403. }
  404.  
  405. }
  406.  
  407. }
  408.  
  409. menu_destroy(menu);
  410.  
  411. return PLUGIN_HANDLED;
  412.  
  413. }
  414.  
  415. public boltmenuh2(id, menu, item)
  416.  
  417. {
  418.  
  419.  
  420.  
  421. if (item == MENU_EXIT)
  422.  
  423. {
  424.  
  425. menu_destroy(menu);
  426.  
  427. return PLUGIN_HANDLED;
  428.  
  429. }
  430.  
  431.  
  432.  
  433. new Data[6], Name[64];
  434.  
  435. new Access, Callback;
  436.  
  437.  
  438.  
  439. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback);
  440.  
  441.  
  442.  
  443. new elo = is_user_alive(id);
  444.  
  445. new item_ar3 = get_pcvar_num(shop3);
  446.  
  447. new item_ar4 = get_pcvar_num(shop4);
  448.  
  449. new health = get_user_health(id)
  450.  
  451.  
  452.  
  453. new Key = str_to_num(Data);
  454.  
  455.  
  456.  
  457. switch (Key)
  458.  
  459. {
  460.  
  461. case 1:
  462.  
  463. {
  464.  
  465. if (g_pontok[id]>= item_ar4 && elo)
  466.  
  467. {
  468.  
  469. if(g_hp)
  470.  
  471. {
  472.  
  473. g_pontok[id] -= item_ar4;
  474.  
  475. set_user_health(id, health+50)
  476.  
  477. g_hp = false;
  478.  
  479. }
  480.  
  481. else
  482.  
  483. {
  484.  
  485. ColorChat(id, GREEN, "[JailBreak Bolt] [Beta] Mar vettel 1x HP -t!");
  486.  
  487. }
  488.  
  489. }
  490.  
  491. }
  492.  
  493. case 2:
  494.  
  495. {
  496.  
  497. if (g_pontok[id]>= item_ar3 && elo)
  498.  
  499. {
  500.  
  501. g_pontok[id] -= item_ar3;
  502.  
  503. g_gumibot[id] = true;
  504.  
  505. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELGUMIBOT);
  506.  
  507. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELGUMIBOT);
  508.  
  509. }
  510.  
  511. }
  512.  
  513. }
  514.  
  515.  
  516.  
  517. menu_destroy(menu);
  518.  
  519. return PLUGIN_HANDLED;
  520.  
  521. }
  522.  
  523. public Change_Weapon(id)
  524.  
  525. {
  526.  
  527. new weaponID = read_data(2);
  528.  
  529.  
  530.  
  531. if(get_user_team(id) == 1)
  532.  
  533. {
  534.  
  535. if(weaponID == CSW_KNIFE && g_csavar[id])
  536.  
  537. {
  538.  
  539. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELCSAVAR);
  540.  
  541. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELCSAVAR);
  542.  
  543. }
  544.  
  545. else if(weaponID == CSW_KNIFE && g_baseball[id])
  546.  
  547. {
  548.  
  549. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELBASEBALL);
  550.  
  551. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELBASEBALL);
  552.  
  553. }
  554.  
  555. }
  556.  
  557. else if(get_user_team(id) == 2)
  558.  
  559. {
  560.  
  561. if(weaponID == CSW_KNIFE && g_gumibot[id])
  562.  
  563. {
  564.  
  565. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELGUMIBOT);
  566.  
  567. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELGUMIBOT);
  568.  
  569. }
  570.  
  571. }
  572.  
  573. return PLUGIN_CONTINUE;
  574.  
  575. }
  576.  
  577. public PlayerSpawn(id)
  578.  
  579. {
  580.  
  581. if (is_user_alive(id))
  582.  
  583. {
  584.  
  585. boltmenu(id)
  586.  
  587. }
  588.  
  589. }
  590.  
  591. public TakeDamage(victim, inflictor, attacker, Float:damage, damage_bits)
  592.  
  593. {
  594.  
  595. if(get_user_weapon(attacker) == CSW_KNIFE)
  596.  
  597. {
  598.  
  599. if(get_user_team(attacker) == 1 && g_csavar[attacker])
  600.  
  601. {
  602.  
  603. SetHamParamFloat(4, 100.0);
  604.  
  605. }
  606.  
  607. else if(get_user_team(attacker) == 1 && g_baseball[attacker])
  608.  
  609. {
  610.  
  611. SetHamParamFloat(4, 75.0);
  612.  
  613. }
  614.  
  615. else if(get_user_team(attacker) == 2 && g_gumibot[attacker])
  616.  
  617. {
  618.  
  619. SetHamParamFloat(4, 100.0);
  620.  
  621. }
  622.  
  623. }
  624.  
  625. return HAM_IGNORED;
  626.  
  627. }
  628.  
  629. public client_PreThink(id)
  630.  
  631. {
  632.  
  633. set_hudmessage(255, 255, 255, 0.9, 0.8, 0, 6.0, 4.5);
  634.  
  635. ShowSyncHudMsg(id, syncObjp,"Pontjaid: %i", g_pontok[id]);
  636.  
  637. return PLUGIN_CONTINUE;
  638.  
  639. }
  640.  
  641.  
  642. public fw_SetModel(entity, model[])
  643. {
  644. if(!pev_valid(entity))
  645. return FMRES_IGNORED
  646.  
  647. if(!equali(model, OLDWORLD_MODEL))
  648. return FMRES_IGNORED
  649.  
  650. new className[33]
  651. pev(entity, pev_classname, className, 32)
  652.  
  653. if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
  654. {
  655. engfunc(EngFunc_SetModel, entity, WORLD_MODEL)
  656. return FMRES_SUPERCEDE
  657. }
  658. return FMRES_IGNORED
  659. }
  660.  
  661.  
  662. public Fwd_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
  663. {
  664.  
  665. if (!is_user_connected(id))
  666.  
  667. if(Machete[id])
  668. {
  669. if (equal(sample[8], "kni", 3))
  670. {
  671. if (equal(sample[14], "sla", 3))
  672. {
  673. switch (random_num(1, 2))
  674. {
  675. case 1: engfunc(EngFunc_EmitSound, id, channel, machete_slash1, volume, attn, flags, pitch)
  676. case 2: engfunc(EngFunc_EmitSound, id, channel, machete_slash2, volume, attn, flags, pitch)
  677. }
  678. return FMRES_SUPERCEDE;
  679. }
  680. if(equal(sample,"weapons/knife_deploy1.wav"))
  681. {
  682. engfunc(EngFunc_EmitSound, id, channel, machete_deploy, volume, attn, flags, pitch)
  683. return FMRES_SUPERCEDE;
  684. }
  685. if (equal(sample[14], "hit", 3))
  686. {
  687. if (sample[17] == 'w')
  688. {
  689. engfunc(EngFunc_EmitSound, id, channel, machete_wall, volume, attn, flags, pitch)
  690. return FMRES_SUPERCEDE;
  691. }
  692. else // hit
  693. {
  694. switch (random_num(1, 4))
  695. {
  696. case 1: engfunc(EngFunc_EmitSound, id, channel, machete_hit1, volume, attn, flags, pitch)
  697. case 2: engfunc(EngFunc_EmitSound, id, channel, machete_hit2, volume, attn, flags, pitch)
  698. case 3: engfunc(EngFunc_EmitSound, id, channel, machete_hit3, volume, attn, flags, pitch)
  699. case 4: engfunc(EngFunc_EmitSound, id, channel, machete_hit4, volume, attn, flags, pitch)
  700. }
  701.  

_________________
Nem szégyen megköszönni :)

'The dictator is coming' :D


A hozzászólást 1 alkalommal szerkesztették, utoljára mforce 2015.10.18. 14:05-kor.
Témanév javítva! Legközelebb figyelj oda!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Ez valaki bírná javítani ?
HozzászólásElküldve: 2015.10.18. 11:25 
Offline
Lelkes

Csatlakozott: 2015.01.24. 15:32
Hozzászólások: 21
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 5 alkalommal
Így próbáld meg.
SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. #include <amxmodx>
  3.  
  4. #include <amxmisc>
  5.  
  6. #include <fun>
  7.  
  8. #include <engine>
  9.  
  10. #include <hamsandwich>
  11.  
  12. #include <colorchat>
  13.  
  14.  
  15.  
  16. #define PLUGIN "Bolt"
  17.  
  18. #define VERSION "1.0"
  19.  
  20. #define AUTHOR "Charlie224"
  21.  
  22.  
  23.  
  24. new g_pontok[33];
  25.  
  26. new bool:g_csavar[33];
  27.  
  28. new bool:g_baseball[33];
  29.  
  30. new bool:g_gumibot[33];
  31.  
  32. new shop1;
  33.  
  34. new shop2;
  35.  
  36. new shop3;
  37.  
  38. new shop4;
  39.  
  40. new syncObjp;
  41.  
  42. new bool:g_hp;
  43.  
  44. new Machete[33]
  45.  
  46.  
  47. new VIEW_MODELCSAVAR[] = "models/v_csavarhuzo.mdl";
  48.  
  49. new PLAYER_MODELCSAVAR[] = "models/p_csavarhuzo.mdl";
  50.  
  51. new VIEW_MODELBASEBALL[] = "models/v_baseballuto.mdl";
  52.  
  53. new PLAYER_MODELBASEBALL[] = "models/p_baseballuto.mdl";
  54.  
  55. new VIEW_MODELGUMIBOT[] = "models/v_gumibot.mdl";
  56.  
  57. new PLAYER_MODELGUMIBOT[] = "models/p_gumibot.mdl";
  58.  
  59. new const machete_slash1[] = { "[Shop]JailBreak/Machete/MSlash1.wav" }
  60. new const machete_slash2[] = { "[Shop]JailBreak/Machete/MSlash2.wav" }
  61.  
  62.  
  63.  
  64. public plugin_init()
  65.  
  66. {
  67.  
  68. register_plugin(PLUGIN, VERSION, AUTHOR);
  69.  
  70.  
  71.  
  72. register_event("DeathMsg", "Death", "a");
  73.  
  74. register_event("CurWeapon", "Change_Weapon", "be", "1=1");
  75.  
  76. register_logevent("Event_Roundend", 2, "1=Round_End")
  77.  
  78. register_logevent("Start", 2, "1=Round_Start")
  79.  
  80.  
  81.  
  82. register_clcmd("say /bolt", "boltmenu");
  83.  
  84.  
  85.  
  86. RegisterHam(Ham_Spawn, "player", "PlayerSpawn", 1);
  87.  
  88. RegisterHam(Ham_TakeDamage, "player", "TakeDamage", 0);
  89.  
  90.  
  91.  
  92. shop1 = register_cvar("shop_1", "15");
  93.  
  94. shop2 = register_cvar("shop_2", "10");
  95.  
  96. shop3 = register_cvar("shop_3", "20");
  97.  
  98. shop4 = register_cvar("shop_4", "5");
  99.  
  100. syncObjp = CreateHudSyncObj();
  101.  
  102. }
  103.  
  104. public plugin_precache()
  105.  
  106. {
  107.  
  108. precache_model(VIEW_MODELCSAVAR);
  109.  
  110. precache_model(PLAYER_MODELCSAVAR);
  111.  
  112. precache_model(VIEW_MODELBASEBALL);
  113.  
  114. precache_model(PLAYER_MODELBASEBALL);
  115.  
  116. precache_model(VIEW_MODELGUMIBOT);
  117.  
  118. precache_model(PLAYER_MODELGUMIBOT);
  119.  
  120. }
  121.  
  122. public Start(id)
  123.  
  124. {
  125.  
  126. g_hp = true;
  127.  
  128. }
  129.  
  130. public Event_Roundend()
  131.  
  132. {
  133.  
  134. new players[32], pnum, tempid;
  135.  
  136. get_players(players, pnum, "c");
  137.  
  138.  
  139.  
  140. for(new i; i<pnum; i++)
  141.  
  142. {
  143.  
  144. tempid = players[i];
  145.  
  146. g_csavar[tempid] = false;
  147.  
  148. g_baseball[tempid] = false;
  149.  
  150. g_gumibot[tempid] = false;
  151.  
  152. }
  153.  
  154. }
  155.  
  156. public Death()
  157.  
  158. {
  159.  
  160. new id = read_data(2);
  161.  
  162. new attacker = read_data(1);
  163.  
  164.  
  165.  
  166. if(!is_user_alive(attacker))
  167.  
  168. return PLUGIN_CONTINUE;
  169.  
  170.  
  171.  
  172. if(get_user_team(id) != get_user_team(attacker))
  173.  
  174. {
  175.  
  176. g_pontok[attacker]+=5;
  177.  
  178. }
  179.  
  180.  
  181.  
  182. return PLUGIN_CONTINUE;
  183.  
  184. }
  185.  
  186. public boltmenu(id)
  187.  
  188. {
  189.  
  190. if(get_user_team(id) == 1)
  191.  
  192. {
  193.  
  194. if(is_user_alive(id))
  195.  
  196. {
  197.  
  198. static opcion[64];
  199.  
  200.  
  201.  
  202. formatex(opcion, charsmax(opcion),"\y[JailBreak Bolt] [Beta] v0.1");
  203.  
  204. new iMenu = menu_create(opcion, "boltmenuh");
  205.  
  206.  
  207.  
  208. formatex(opcion, charsmax(opcion),"\w+50 HP(1 korben 1x) \r%d pont", get_pcvar_num(shop4));
  209.  
  210. formatex(opcion, charsmax(opcion),"\wBaseballuto(75 Sebzes) \r%d pont", get_pcvar_num(shop2));
  211.  
  212. formatex(opcion, charsmax(opcion),"\wCsavarhuzo(100 Sebzes) \r%d pont", get_pcvar_num(shop1));
  213.  
  214. menu_additem(iMenu, opcion, "3");
  215.  
  216.  
  217.  
  218. menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL);
  219.  
  220. menu_display(id, iMenu, 0);
  221.  
  222. }
  223.  
  224. else
  225.  
  226. {
  227.  
  228. ColorChat(id, GREEN, "[JailBreak Bolt] [Beta] Csak elok hasznalhatjak a boltot");
  229.  
  230. }
  231.  
  232. }
  233.  
  234. else if(get_user_team(id) == 2)
  235.  
  236. {
  237.  
  238. if(is_user_alive(id))
  239.  
  240. {
  241.  
  242. static opcion[64];
  243.  
  244.  
  245.  
  246. formatex(opcion, charsmax(opcion),"\y[JailBreak Bolt] [Beta] v0.1");
  247.  
  248. new iMenu2 = menu_create(opcion, "boltmenuh2");
  249.  
  250.  
  251.  
  252. formatex(opcion, charsmax(opcion),"\w+50 HP(1 korben 1x) \r%d pont", get_pcvar_num(shop4));
  253.  
  254. formatex(opcion, charsmax(opcion),"\wGumibot(100 Sebzes) \r%d pont", get_pcvar_num(shop3));
  255.  
  256. menu_additem(iMenu2, opcion, "2");
  257.  
  258.  
  259.  
  260. menu_setprop(iMenu2, MPROP_EXIT, MEXIT_ALL);
  261.  
  262. menu_display(id, iMenu2, 0);
  263.  
  264. }
  265.  
  266. else
  267.  
  268. {
  269.  
  270. ColorChat(id, GREEN, "[JailBreak Bolt] [Beta] Csak elok hasznalhatjak a boltot");
  271.  
  272. }
  273.  
  274. }
  275.  
  276.  
  277.  
  278. return PLUGIN_HANDLED;
  279.  
  280. }
  281.  
  282.  
  283.  
  284. public boltmenuh(id, menu, item)
  285.  
  286. {
  287.  
  288.  
  289.  
  290. if (item == MENU_EXIT)
  291.  
  292. {
  293.  
  294. menu_destroy(menu);
  295.  
  296. return PLUGIN_HANDLED;
  297.  
  298. }
  299.  
  300.  
  301.  
  302. new Data[6], Name[64];
  303.  
  304. new Access, Callback;
  305.  
  306.  
  307.  
  308. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback);
  309.  
  310.  
  311.  
  312. new elo = is_user_alive(id);
  313.  
  314. new item_ar1 = get_pcvar_num(shop1);
  315.  
  316. new item_ar2 = get_pcvar_num(shop2);
  317.  
  318. new item_ar4 = get_pcvar_num(shop4);
  319.  
  320. new health = get_user_health(id)
  321.  
  322.  
  323.  
  324. new Key = str_to_num(Data);
  325.  
  326.  
  327.  
  328. switch (Key)
  329.  
  330. {
  331.  
  332. case 1:
  333.  
  334. {
  335.  
  336. if (g_pontok[id]>= item_ar4 && elo)
  337.  
  338. {
  339.  
  340. if(g_hp)
  341.  
  342. {
  343.  
  344. g_pontok[id] -= item_ar4;
  345.  
  346. set_user_health(id, health+50)
  347.  
  348. g_hp = false;
  349.  
  350. }
  351.  
  352. else
  353.  
  354. {
  355.  
  356. ColorChat(id, GREEN, "[JailBreak Bolt] [Beta] Mar vettel 1x HP -t!");
  357.  
  358. }
  359.  
  360. }
  361.  
  362. }
  363.  
  364. case 2:
  365.  
  366. {
  367.  
  368. if (g_pontok[id]>= item_ar2 && elo)
  369.  
  370. {
  371.  
  372. g_pontok[id] -= item_ar2;
  373.  
  374. g_baseball[id] = true;
  375.  
  376. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELBASEBALL);
  377.  
  378. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELBASEBALL);
  379.  
  380. }
  381.  
  382. }
  383.  
  384. case 3:
  385.  
  386. {
  387.  
  388. if (g_pontok[id]>= item_ar1 && elo)
  389.  
  390. {
  391.  
  392. g_pontok[id] -= item_ar1;
  393.  
  394. g_csavar[id] = true;
  395.  
  396. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELCSAVAR);
  397.  
  398. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELCSAVAR);
  399.  
  400. Machete[id] = 0
  401.  
  402.  
  403.  
  404. }
  405.  
  406. }
  407.  
  408. }
  409.  
  410. menu_destroy(menu);
  411.  
  412. return PLUGIN_HANDLED;
  413.  
  414. }
  415.  
  416. public boltmenuh2(id, menu, item)
  417.  
  418. {
  419.  
  420.  
  421.  
  422. if (item == MENU_EXIT)
  423.  
  424. {
  425.  
  426. menu_destroy(menu);
  427.  
  428. return PLUGIN_HANDLED;
  429.  
  430. }
  431.  
  432.  
  433.  
  434. new Data[6], Name[64];
  435.  
  436. new Access, Callback;
  437.  
  438.  
  439.  
  440. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback);
  441.  
  442.  
  443.  
  444. new elo = is_user_alive(id);
  445.  
  446. new item_ar3 = get_pcvar_num(shop3);
  447.  
  448. new item_ar4 = get_pcvar_num(shop4);
  449.  
  450. new health = get_user_health(id)
  451.  
  452.  
  453.  
  454. new Key = str_to_num(Data);
  455.  
  456.  
  457.  
  458. switch (Key)
  459.  
  460. {
  461.  
  462. case 1:
  463.  
  464. {
  465.  
  466. if (g_pontok[id]>= item_ar4 && elo)
  467.  
  468. {
  469.  
  470. if(g_hp)
  471.  
  472. {
  473.  
  474. g_pontok[id] -= item_ar4;
  475.  
  476. set_user_health(id, health+50)
  477.  
  478. g_hp = false;
  479.  
  480. }
  481.  
  482. else
  483.  
  484. {
  485.  
  486. ColorChat(id, GREEN, "[JailBreak Bolt] [Beta] Mar vettel 1x HP -t!");
  487.  
  488. }
  489.  
  490. }
  491.  
  492. }
  493.  
  494. case 2:
  495.  
  496. {
  497.  
  498. if (g_pontok[id]>= item_ar3 && elo)
  499.  
  500. {
  501.  
  502. g_pontok[id] -= item_ar3;
  503.  
  504. g_gumibot[id] = true;
  505.  
  506. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELGUMIBOT);
  507.  
  508. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELGUMIBOT);
  509.  
  510. }
  511.  
  512. }
  513.  
  514. }
  515.  
  516.  
  517.  
  518. menu_destroy(menu);
  519.  
  520. return PLUGIN_HANDLED;
  521.  
  522. }
  523.  
  524. public Change_Weapon(id)
  525.  
  526. {
  527.  
  528. new weaponID = read_data(2);
  529.  
  530.  
  531.  
  532. if(get_user_team(id) == 1)
  533.  
  534. {
  535.  
  536. if(weaponID == CSW_KNIFE && g_csavar[id])
  537.  
  538. {
  539.  
  540. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELCSAVAR);
  541.  
  542. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELCSAVAR);
  543.  
  544. }
  545.  
  546. else if(weaponID == CSW_KNIFE && g_baseball[id])
  547.  
  548. {
  549.  
  550. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELBASEBALL);
  551.  
  552. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELBASEBALL);
  553.  
  554. }
  555.  
  556. }
  557.  
  558. else if(get_user_team(id) == 2)
  559.  
  560. {
  561.  
  562. if(weaponID == CSW_KNIFE && g_gumibot[id])
  563.  
  564. {
  565.  
  566. entity_set_string(id, EV_SZ_viewmodel, VIEW_MODELGUMIBOT);
  567.  
  568. entity_set_string(id, EV_SZ_weaponmodel, PLAYER_MODELGUMIBOT);
  569.  
  570. }
  571.  
  572. }
  573.  
  574. return PLUGIN_CONTINUE;
  575.  
  576. }
  577.  
  578. public PlayerSpawn(id)
  579.  
  580. {
  581.  
  582. if (is_user_alive(id))
  583.  
  584. {
  585.  
  586. boltmenu(id)
  587.  
  588. }
  589.  
  590. }
  591.  
  592. public TakeDamage(victim, inflictor, attacker, Float:damage, damage_bits)
  593.  
  594. {
  595.  
  596. if(get_user_weapon(attacker) == CSW_KNIFE)
  597.  
  598. {
  599.  
  600. if(get_user_team(attacker) == 1 && g_csavar[attacker])
  601.  
  602. {
  603.  
  604. SetHamParamFloat(4, 100.0);
  605.  
  606. }
  607.  
  608. else if(get_user_team(attacker) == 1 && g_baseball[attacker])
  609.  
  610. {
  611.  
  612. SetHamParamFloat(4, 75.0);
  613.  
  614. }
  615.  
  616. else if(get_user_team(attacker) == 2 && g_gumibot[attacker])
  617.  
  618. {
  619.  
  620. SetHamParamFloat(4, 100.0);
  621.  
  622. }
  623.  
  624. }
  625.  
  626. return HAM_IGNORED;
  627.  
  628. }
  629.  
  630. public client_PreThink(id)
  631.  
  632. {
  633.  
  634. set_hudmessage(255, 255, 255, 0.9, 0.8, 0, 6.0, 4.5);
  635.  
  636. ShowSyncHudMsg(id, syncObjp,"Pontjaid: %i", g_pontok[id]);
  637.  
  638. return PLUGIN_CONTINUE;
  639.  
  640. }
  641.  
  642.  
  643. public fw_SetModel(entity, model[])
  644. {
  645. if(!pev_valid(entity))
  646. return FMRES_IGNORED
  647.  
  648. if(!equali(model, OLDWORLD_MODEL))
  649. return FMRES_IGNORED
  650. }
  651. new className[33]
  652. pev(entity, pev_classname, className, 32)
  653.  
  654. if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
  655. {
  656. engfunc(EngFunc_SetModel, entity, WORLD_MODEL)
  657. return FMRES_SUPERCEDE
  658. }
  659. return FMRES_IGNORED
  660. }
  661.  
  662.  
  663. public Fwd_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
  664. {
  665.  
  666. if (!is_user_connected(id))
  667.  
  668. if(Machete[id])
  669. {
  670. if (equal(sample[8], "kni", 3))
  671. {
  672. if (equal(sample[14], "sla", 3))
  673. {
  674. switch (random_num(1, 2))
  675. {
  676. case 1: engfunc(EngFunc_EmitSound, id, channel, machete_slash1, volume, attn, flags, pitch)
  677. case 2: engfunc(EngFunc_EmitSound, id, channel, machete_slash2, volume, attn, flags, pitch)
  678. }
  679. return FMRES_SUPERCEDE;
  680. }
  681. if(equal(sample,"weapons/knife_deploy1.wav"))
  682. {
  683. engfunc(EngFunc_EmitSound, id, channel, machete_deploy, volume, attn, flags, pitch)
  684. return FMRES_SUPERCEDE;
  685. }
  686. if (equal(sample[14], "hit", 3))
  687. {
  688. if (sample[17] == 'w')
  689. {
  690. engfunc(EngFunc_EmitSound, id, channel, machete_wall, volume, attn, flags, pitch)
  691. return FMRES_SUPERCEDE;
  692. }
  693. else // hit
  694. {
  695. switch (random_num(1, 4))
  696. {
  697. case 1: engfunc(EngFunc_EmitSound, id, channel, machete_hit1, volume, attn, flags, pitch)
  698. case 2: engfunc(EngFunc_EmitSound, id, channel, machete_hit2, volume, attn, flags, pitch)
  699. case 3: engfunc(EngFunc_EmitSound, id, channel, machete_hit3, volume, attn, flags, pitch)
  700. case 4: engfunc(EngFunc_EmitSound, id, channel, machete_hit4, volume, attn, flags, pitch)
  701. }
  702.  

_________________
---------------------------------------------------------------------------------------------------------------
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hang a modellhez
HozzászólásElküldve: 2015.10.29. 07:36 
Offline
Senior Tag
Avatar

Csatlakozott: 2013.11.12. 16:39
Hozzászólások: 258
Megköszönt másnak: 87 alkalommal
Megköszönték neki: 2 alkalommal
644. sorban hiba

_________________
Nem szégyen megköszönni :)

'The dictator is coming' :D


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  [ 3 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 84 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