hlmod.hu
https://hlmod.hu/

[ZP] Lőszer Változás [Dhud]
https://hlmod.hu/viewtopic.php?f=101&t=12350
Oldal: 1 / 2

Szerző:  VirTuaL ~` [ 2011.12.12. 18:24 ]
Hozzászólás témája:  [ZP] Lőszer Változás [Dhud]

Plugin Neve:
[ZP] Lőszer Változás [Dhud]
Plugint készitette:
ZETA [M|E|N]
Játék:
Counter-Strike
Kategória:
Szórakoztató
Eredeti link:
Nincs megadva
Jóváhagyó:
Ismeretlen


- [ZP] Ammo Change -

Leírás:
Ez a plugin zombi módhoz készült,lényege hogy kijelzi ha kapsz x lőszer csomagot director hudmessage-el.
/change paranccsal változtatni lehet...

Képek:
Kép

Cvar:
ac_show_type 1 //1:hud, más: print_center

Telepítés: AMXX a plugins mappába
Plugin nevét beírod a plugins_zplague.ini-be

Remélem tetszik :D


SMA
AMXX
*A fordítás a aghl.ru oldalon történik.

    Szerző:  laacee [ 2012.02.23. 18:07 ]
    Hozzászólás témája:  Re: [ZP] Lőszer Változás [Dhud] | Mind | Ismeretlen

    fasza kis plugin:d
    koszi a feltoltest+!:D

    Szerző:  VirTuaL ~` [ 2012.02.24. 14:47 ]
    Hozzászólás témája:  Re: [ZP] Lőszer Változás [Dhud] | Mind | Ismeretlen

    Nm :)

    Szerző:  kiki [ 2013.11.28. 12:52 ]
    Hozzászólás témája:  Re: [ZP] Lőszer Változás [Dhud] | Counter-Strike | Szórakoztató

    Leírás cvarral frissítve.

    Szerző:  Badboy.killer [ 2013.12.17. 13:26 ]
    Hozzászólás témája:  Re: [ZP] Lőszer Változás [Dhud] | Counter-Strike | Szórakoztató

    Én nem tudom lefordítani az sma-t. Hibát jelez az 5. sorban!

    Szerző:  kiki [ 2013.12.17. 15:37 ]
    Hozzászólás témája:  Re: [ZP] Lőszer Változás [Dhud] | Counter-Strike | Szórakoztató

    Mert nincs letöltve a szükséges zombieplague.inc. Töltsd le valahonnan, s tedd be a megfelelő helyre (alapértelmezett: amxmodx/base/scripting/include/).

    Szerző:  norbee.16 [ 2013.12.17. 15:38 ]
    Hozzászólás témája:  Re: [ZP] Lőszer Változás [Dhud] | Counter-Strike | Szórakoztató

    Badboy.killer írta:
    Én nem tudom lefordítani az sma-t. Hibát jelez az 5. sorban!

    Esetleg így probáld meg:
    SMA Forráskód: [ Mindet kijelol ]
    1. #include <amxmodx>
    2. #include <amxmisc>
    3. #include <cstrike>
    4. #include <zombieplague>
    5.  
    6. new ammo[3][33],string[21],cvarShowType,ammopacks
    7.  
    8. public plugin_init() {
    9. register_plugin("[ZP] AmmoChange", "1.0", "ZETA [M|E|N]")
    10. register_logevent("round_start", 2, "1=Round_Start")
    11. cvarShowType = register_cvar("ac_show_type", "1")
    12.  
    13. register_clcmd("say /change","func_change",ADMIN_ALL,"")
    14. }
    15.  
    16. public round_start() {
    17. new players[32],num,i
    18. get_players(players,num)
    19.  
    20. for(i=1;i<num;i++) {
    21. ammo[0][players[i]] = zp_get_user_ammo_packs(players[i])
    22. }
    23. }
    24.  
    25. public client_putinserver(id) {
    26. set_task(3.0,"func_ammo",id)
    27. }
    28.  
    29. public func_ammo(id) {
    30. ammopacks = zp_get_user_ammo_packs(id)
    31.  
    32. ammo[0][id] = ammopacks
    33. ammo[1][id] = ammopacks
    34. ammo[2][id] = ammopacks
    35.  
    36. set_task(1.0,"change_ammo",id,_,_,"b")
    37. }
    38.  
    39. public change_ammo(id) {
    40. if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
    41. return PLUGIN_HANDLED
    42.  
    43. ammo[1][id] = zp_get_user_ammo_packs(id)
    44.  
    45. if(ammo[1][id] != ammo[2][id]) {
    46. if(ammo[1][id] > ammo[2][id]) {
    47. ammopacks = ammo[1][id] - ammo[2][id]
    48. format(string,charsmax(string),"[ +%d Lőszer Csomag ]", ammopacks)
    49. }
    50. else {
    51. ammopacks = ammo[2][id] - ammo[1][id]
    52. format(string,charsmax(string),"[ -%d Lőszer Csomag ]", ammopacks)
    53. }
    54.  
    55. ammo[2][id] = ammo[1][id]
    56.  
    57. if(get_pcvar_num(cvarShowType)) {
    58. set_hudmessage(255, 255, 255, -1.0, 0.37, 0, 0.1, 2.0,_,_,3)
    59. show_dhudmessage(id, "%s", string)
    60. }
    61. else
    62. client_print(id, print_center, "%s", string)
    63. }
    64.  
    65. return PLUGIN_HANDLED
    66. }
    67.  
    68. public client_disconnect(id) {
    69. ammo[0][id] = 0
    70. ammo[1][id] = 0
    71. ammo[2][id] = 0
    72.  
    73. remove_task(id)
    74. }
    75.  
    76. public func_change(id) {
    77. if(ammo[0][id] != ammo[2][id]) {
    78. if(ammo[0][id] > ammo[2][id]) {
    79. ammopacks = ammo[0][id] - ammo[2][id]
    80. client_print(id,print_chat,"", ammopacks)
    81. }
    82. else {
    83. ammopacks = ammo[2][id] - ammo[0][id]
    84. client_print(id,print_chat,"", ammopacks)
    85. }
    86. }
    87. else
    88. client_print(id,print_chat,"")
    89. return PLUGIN_HANDLED
    90. }

    Szerző:  andrisgaming [ 2014.06.30. 08:32 ]
    Hozzászólás témája:  Re: [ZP] Lőszer Változás [Dhud]

    Ha nincs amxmodx comilered akkor definiálni kell az inclue <zombieplague> -t cseréld le erre:
    SMA Forráskód: [ Mindet kijelol ]
    1. #if defined _zombieplague_included
    2. #endinput
    3. #endif
    4. #define _zombieplague_included
    5.  
    6. #define ZP_TEAM_ZOMBIE (1<<0)
    7. #define ZP_TEAM_HUMAN (1<<1)
    8. #define ZP_TEAM_NEMESIS (1<<2)
    9. #define ZP_TEAM_SURVIVOR (1<<3)
    10.  
    11. enum
    12. {
    13. MODE_INFECTION = 1,
    14. MODE_NEMESIS,
    15. MODE_SURVIVOR,
    16. MODE_SWARM,
    17. MODE_MULTI,
    18. MODE_PLAGUE
    19. }
    20.  
    21. enum
    22. {
    23. WIN_NO_ONE = 0,
    24. WIN_ZOMBIES,
    25. WIN_HUMANS
    26. }
    27.  
    28. #define ZP_PLUGIN_HANDLED 97
    29.  
    30. native zp_get_user_zombie(id)
    31. native zp_get_user_nemesis(id)
    32. native zp_get_user_survivor(id)
    33. native zp_get_user_first_zombie(id)
    34. native zp_get_user_last_zombie(id)
    35. native zp_get_user_last_human(id)
    36. native zp_get_user_zombie_class(id)
    37. native zp_get_user_next_class(id)
    38. native zp_set_user_zombie_class(id, classid)
    39. native zp_get_user_ammo_packs(id)
    40. native zp_set_user_ammo_packs(id, amount)
    41. native zp_get_zombie_maxhealth(id)
    42. native zp_get_user_batteries(id)
    43. native zp_set_user_batteries(id, charge)
    44. native zp_get_user_nightvision(id)
    45. native zp_set_user_nightvision(id, set)
    46. native zp_infect_user(id, infector = 0, silent = 0, rewards = 0)
    47. native zp_disinfect_user(id, silent = 0)
    48. native zp_make_user_nemesis(id)
    49. native zp_make_user_survivor(id)
    50. native zp_respawn_user(id, team)
    51. native zp_force_buy_extra_item(id, itemid, ignorecost = 0)
    52. native zp_override_user_model(id, const newmodel[], modelindex = 0)
    53. native zp_has_round_started()
    54. native zp_is_nemesis_round()
    55. native zp_is_survivor_round()
    56. native zp_is_swarm_round()
    57. native zp_is_plague_round()
    58. native zp_get_zombie_count()
    59. native zp_get_human_count()
    60. native zp_get_nemesis_count()
    61. native zp_get_survivor_count()
    62. native zp_register_extra_item(const name[], cost, teams)
    63. native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback)
    64. native zp_get_extra_item_id(const name[])
    65. native zp_get_zombie_class_id(const name[])
    66. native zp_get_zombie_class_info(classid, info[], len)
    67. forward zp_round_started(gamemode, id)
    68. forward zp_round_ended(winteam)
    69. forward zp_user_infected_pre(id, infector, nemesis)
    70. forward zp_user_infected_post(id, infector, nemesis)
    71. forward zp_user_humanized_pre(id, survivor)
    72. forward zp_user_humanized_post(id, survivor)
    73. forward zp_user_infect_attempt(id, infector, nemesis)
    74. forward zp_user_humanize_attempt(id, survivor)
    75. forward zp_extra_item_selected(id, itemid)
    76. forward zp_user_unfrozen(id)
    77. forward zp_user_last_zombie(id)
    78. forward zp_user_last_human(id)
    79.  
    80. #define ZP_TEAM_ANY 0
    81. #define ZP_TEAM_NO_ONE 0

    Szerző:  kiralyadam [ 2014.06.30. 08:37 ]
    Hozzászólás témája:  Re: [ZP] Lőszer Változás [Dhud]

    Ez kellett nekem! :xicon_e_biggrin: Köszönöm szépen!

    Szerző:  andrisgaming [ 2014.06.30. 08:38 ]
    Hozzászólás témája:  Re: [ZP] Lőszer Változás [Dhud]

    Valaki leírná, hogy hogyan átírni a nagyságát? :)

    Oldal: 1 / 2 Minden időpont UTC+02:00 időzóna szerinti
    Powered by phpBB® Forum Software © phpBB Limited
    https://www.phpbb.com/