hlmod.hu
https://hlmod.hu/

Híres Vip! Nemesis és Túlélő vásár help !
https://hlmod.hu/viewtopic.php?f=9&t=15282
Oldal: 1 / 1

Szerző:  nyalka17 [ 2014.04.08. 14:51 ]
Hozzászólás témája:  Híres Vip! Nemesis és Túlélő vásár help !

Sziasztok valaki meg tudja csinálni hogy van a nemesis és túlélő vásár, és azt szeretném hogy a nemesis csak zombi tudja venni túlélőt csak ember tudja venni pl : ha ott van buy nemesis ott van mind a 2 menübe úgyértve zombinak is meg lehet venni túlélőt meg embernekis és én azt szeretném hogy csak a túlélőt csak ember tudja a nemesist csak zombi remélem érthető ha valaki meg csinálja köszönöm ezt is is !!

ez is fontos lenne nekem úgy hogy szertném ha segítenétek nagy scripterek mert sok jó scripter van itt ! köszönöm köszönöm !


ha jó let megy a ++++++++++ itt van sma:

Csatolmány:
zm_vip_extra_vasar_nvt.sma [3.85 KiB]
Letöltve 78 alkalommal.

Szerző:  ultraibolya [ 2014.04.08. 15:06 ]
Hozzászólás témája:  Re: Híres Vip! Nemesis és Túlélő vásár help !

Ha a zmvip incet csatolod akkor megpróbálom megcsinálni.

Szerző:  nyalka17 [ 2014.04.08. 15:07 ]
Hozzászólás témája:  Re: Híres Vip! Nemesis és Túlélő vásár help !

Csatolmány:
zmvip.inc [2.19 KiB]
Letöltve 82 alkalommal.


tess ha kel vami még hozzá írj

Szerző:  ultraibolya [ 2014.04.08. 15:21 ]
Hozzászólás témája:  Re: Híres Vip! Nemesis és Túlélő vásár help !

Teszt nem volt

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <zombieplague>
  3. #include <zmvip>
  4.  
  5. #define PLUGIN "[ZP] S/N Buy"
  6. #define VERSION "1.1"
  7. #define AUTHOR "aaarnas"
  8.  
  9. new g_msgSayText
  10. new nemesis, survivor
  11. new g_bought[33], bought
  12. new cvar_n_price, cvar_s_price, cvar_limit_all, cvar_everytime, cvar_show_bought, cvar_allow_times
  13.  
  14. public plugin_init() {
  15. register_plugin(PLUGIN, VERSION, AUTHOR)
  16. cvar_everytime = register_cvar("zp_allow_buy", "2")
  17. cvar_allow_times = register_cvar("zp_allow_times", "20")
  18. cvar_limit_all = register_cvar("zp_limit_for_all", "1")
  19. cvar_n_price = register_cvar("zp_nemesis_price", "9200")
  20. cvar_s_price = register_cvar("zp_survivor_price", "8000")
  21. cvar_show_bought = register_cvar("zp_show_who_bought", "1")
  22.  
  23. g_msgSayText = get_user_msgid("SayText")
  24.  
  25. // Extra items
  26. nemesis = zv_register_extra_item("Buy Nemesis", "For one round", get_pcvar_num(cvar_n_price), 0)
  27. survivor = zv_register_extra_item("Buy Survivor","For one round", get_pcvar_num(cvar_s_price), 0)
  28. }
  29.  
  30. public zp_round_ended()
  31. bought = false
  32.  
  33. public zv_extra_item_selected(id, itemid) {
  34.  
  35. new value = get_pcvar_num(cvar_everytime)
  36.  
  37. if(itemid == nemesis) {
  38. if(!zp_get_user_zombie(id)){
  39. client_print(id,print_chat,"Csak zombie tud venni Nemesist!")
  40. return PLUGIN_HANDLED
  41. }
  42. if(get_pcvar_num(cvar_limit_all) && bought) {
  43. client_printcolor(id, "/g[ZP] This is no more avaible in this round. Try next round.")
  44. return ZV_PLUGIN_HANDLED
  45. }
  46. if(g_bought[id] >= get_pcvar_num(cvar_allow_times)) {
  47. client_printcolor(id, "/g[ZP] You can't buy it more than %d times.", get_pcvar_num(cvar_allow_times))
  48. return ZV_PLUGIN_HANDLED
  49. }
  50. if(value == 2) {
  51. zp_make_user_nemesis(id)
  52. new name[64]
  53. get_user_name(id, name, 63)
  54. client_printcolor(0, "/g[ZP] %s /ybought nemesis", name)
  55. g_bought[id]++
  56. }
  57. else if(zp_has_round_started() == value) {
  58. zp_make_user_nemesis(id)
  59. if(get_pcvar_num(cvar_show_bought)) {
  60. new name[64]
  61. get_user_name(id, name, 63)
  62. client_printcolor(0, "/g[ZP] %s /ybought nemesis", name)
  63. g_bought[id]++
  64. bought = true
  65. }
  66. }
  67. else {
  68. client_printcolor(id, "/g[ZP] /yYou can buy Nemesis only when %s.", value ? "round started":"round not started")
  69. return ZV_PLUGIN_HANDLED
  70. }
  71. }
  72. else if(itemid == survivor) {
  73. if(!zp_get_user_zombie(id) && !zp_get_user_nemesis(id)){
  74. if(get_pcvar_num(cvar_limit_all) && bought) {
  75. client_printcolor(id, "/g[ZP] This is no more avaible in this round. Try next round.")
  76. return ZV_PLUGIN_HANDLED
  77. }
  78. if(g_bought[id] >= get_pcvar_num(cvar_allow_times)) {
  79. client_printcolor(id, "/g[ZP] You can't buy it more than %d times.", get_pcvar_num(cvar_allow_times))
  80. return ZV_PLUGIN_HANDLED
  81. }
  82. if(value == 2) {
  83. zp_make_user_survivor(id)
  84. new name[64]
  85. get_user_name(id, name, 63)
  86. client_printcolor(0, "/g[ZP] %s /ybought nemesis", name)
  87. g_bought[id]++
  88. }
  89. else if(zp_has_round_started() == value) {
  90. zp_make_user_survivor(id)
  91. if(get_pcvar_num(cvar_show_bought)) {
  92. new name[64]
  93. get_user_name(id, name, 63)
  94. client_printcolor(0, "/g[ZP] %s /ybought survivor", name)
  95. g_bought[id]++
  96. bought = true
  97. }
  98. }
  99. else {
  100. client_printcolor(id, "/g[ZP] /yYou can buy Survivor only when %s.", value ? "round started":"round not started")
  101. return ZV_PLUGIN_HANDLED
  102. }
  103. }
  104. else{
  105. client_print(id,print_chat,"Csak ember tud tulelot venni!")
  106. return PLUGIN_HANDLED
  107. }
  108. }
  109. return 1
  110. }
  111.  
  112. stock client_printcolor(const id, const input[], any:...)
  113. {
  114. new iCount = 1, iPlayers[32]
  115.  
  116. static szMsg[191]
  117. vformat(szMsg, charsmax(szMsg), input, 3)
  118.  
  119. replace_all(szMsg, 190, "/g", "^4") // green txt
  120. replace_all(szMsg, 190, "/y", "^1") // orange txt
  121. replace_all(szMsg, 190, "/ctr", "^3") // team txt
  122. replace_all(szMsg, 190, "/w", "^0") // team txt
  123.  
  124. if(id) iPlayers[0] = id
  125. else get_players(iPlayers, iCount, "ch")
  126.  
  127. for (new i = 0; i < iCount; i++)
  128. {
  129. if (is_user_connected(iPlayers[i]))
  130. {
  131. message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, iPlayers[i])
  132. write_byte(iPlayers[i])
  133. write_string(szMsg)
  134. message_end()
  135. }
  136. }
  137. }

Szerző:  nyalka17 [ 2014.04.08. 15:54 ]
Hozzászólás témája:  Re: Híres Vip! Nemesis és Túlélő vásár help !

ultraibolya írta:
Teszt nem volt

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <zombieplague>
  3. #include <zmvip>
  4.  
  5. #define PLUGIN "[ZP] S/N Buy"
  6. #define VERSION "1.1"
  7. #define AUTHOR "aaarnas"
  8.  
  9. new g_msgSayText
  10. new nemesis, survivor
  11. new g_bought[33], bought
  12. new cvar_n_price, cvar_s_price, cvar_limit_all, cvar_everytime, cvar_show_bought, cvar_allow_times
  13.  
  14. public plugin_init() {
  15. register_plugin(PLUGIN, VERSION, AUTHOR)
  16. cvar_everytime = register_cvar("zp_allow_buy", "2")
  17. cvar_allow_times = register_cvar("zp_allow_times", "20")
  18. cvar_limit_all = register_cvar("zp_limit_for_all", "1")
  19. cvar_n_price = register_cvar("zp_nemesis_price", "9200")
  20. cvar_s_price = register_cvar("zp_survivor_price", "8000")
  21. cvar_show_bought = register_cvar("zp_show_who_bought", "1")
  22.  
  23. g_msgSayText = get_user_msgid("SayText")
  24.  
  25. // Extra items
  26. nemesis = zv_register_extra_item("Buy Nemesis", "For one round", get_pcvar_num(cvar_n_price), 0)
  27. survivor = zv_register_extra_item("Buy Survivor","For one round", get_pcvar_num(cvar_s_price), 0)
  28. }
  29.  
  30. public zp_round_ended()
  31. bought = false
  32.  
  33. public zv_extra_item_selected(id, itemid) {
  34.  
  35. new value = get_pcvar_num(cvar_everytime)
  36.  
  37. if(itemid == nemesis) {
  38. if(!zp_get_user_zombie(id)){
  39. client_print(id,print_chat,"Csak zombie tud venni Nemesist!")
  40. return PLUGIN_HANDLED
  41. }
  42. if(get_pcvar_num(cvar_limit_all) && bought) {
  43. client_printcolor(id, "/g[ZP] This is no more avaible in this round. Try next round.")
  44. return ZV_PLUGIN_HANDLED
  45. }
  46. if(g_bought[id] >= get_pcvar_num(cvar_allow_times)) {
  47. client_printcolor(id, "/g[ZP] You can't buy it more than %d times.", get_pcvar_num(cvar_allow_times))
  48. return ZV_PLUGIN_HANDLED
  49. }
  50. if(value == 2) {
  51. zp_make_user_nemesis(id)
  52. new name[64]
  53. get_user_name(id, name, 63)
  54. client_printcolor(0, "/g[ZP] %s /ybought nemesis", name)
  55. g_bought[id]++
  56. }
  57. else if(zp_has_round_started() == value) {
  58. zp_make_user_nemesis(id)
  59. if(get_pcvar_num(cvar_show_bought)) {
  60. new name[64]
  61. get_user_name(id, name, 63)
  62. client_printcolor(0, "/g[ZP] %s /ybought nemesis", name)
  63. g_bought[id]++
  64. bought = true
  65. }
  66. }
  67. else {
  68. client_printcolor(id, "/g[ZP] /yYou can buy Nemesis only when %s.", value ? "round started":"round not started")
  69. return ZV_PLUGIN_HANDLED
  70. }
  71. }
  72. else if(itemid == survivor) {
  73. if(!zp_get_user_zombie(id) && !zp_get_user_nemesis(id)){
  74. if(get_pcvar_num(cvar_limit_all) && bought) {
  75. client_printcolor(id, "/g[ZP] This is no more avaible in this round. Try next round.")
  76. return ZV_PLUGIN_HANDLED
  77. }
  78. if(g_bought[id] >= get_pcvar_num(cvar_allow_times)) {
  79. client_printcolor(id, "/g[ZP] You can't buy it more than %d times.", get_pcvar_num(cvar_allow_times))
  80. return ZV_PLUGIN_HANDLED
  81. }
  82. if(value == 2) {
  83. zp_make_user_survivor(id)
  84. new name[64]
  85. get_user_name(id, name, 63)
  86. client_printcolor(0, "/g[ZP] %s /ybought nemesis", name)
  87. g_bought[id]++
  88. }
  89. else if(zp_has_round_started() == value) {
  90. zp_make_user_survivor(id)
  91. if(get_pcvar_num(cvar_show_bought)) {
  92. new name[64]
  93. get_user_name(id, name, 63)
  94. client_printcolor(0, "/g[ZP] %s /ybought survivor", name)
  95. g_bought[id]++
  96. bought = true
  97. }
  98. }
  99. else {
  100. client_printcolor(id, "/g[ZP] /yYou can buy Survivor only when %s.", value ? "round started":"round not started")
  101. return ZV_PLUGIN_HANDLED
  102. }
  103. }
  104. else{
  105. client_print(id,print_chat,"Csak ember tud tulelot venni!")
  106. return PLUGIN_HANDLED
  107. }
  108. }
  109. return 1
  110. }
  111.  
  112. stock client_printcolor(const id, const input[], any:...)
  113. {
  114. new iCount = 1, iPlayers[32]
  115.  
  116. static szMsg[191]
  117. vformat(szMsg, charsmax(szMsg), input, 3)
  118.  
  119. replace_all(szMsg, 190, "/g", "^4") // green txt
  120. replace_all(szMsg, 190, "/y", "^1") // orange txt
  121. replace_all(szMsg, 190, "/ctr", "^3") // team txt
  122. replace_all(szMsg, 190, "/w", "^0") // team txt
  123.  
  124. if(id) iPlayers[0] = id
  125. else get_players(iPlayers, iCount, "ch")
  126.  
  127. for (new i = 0; i < iCount; i++)
  128. {
  129. if (is_user_connected(iPlayers[i]))
  130. {
  131. message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, iPlayers[i])
  132. write_byte(iPlayers[i])
  133. write_string(szMsg)
  134. message_end()
  135. }
  136. }
  137. }


okés megnézzetem nem lehet megvenni de a lőszer csomagot leveszi az fail meg lehet csinálni ne vegye loszer csomagot ?
csak úgy lenne jó! meg lehet ?

Szerző:  DarkAngel^^ [ 2014.04.10. 22:14 ]
Hozzászólás témája:  Re: Híres Vip! Nemesis és Túlélő vásár help !

na, szóval te nem azt akkarod hogy pl a túlélőt a zombi ne vehesék ? Meg a snipert? Ha azt akkarod ez privát lesz!

Szerző:  ultraibolya [ 2014.04.11. 13:18 ]
Hozzászólás témája:  Re: Híres Vip! Nemesis és Túlélő vásár help !

1 funkció privát? zp_get_user_zombie?

Szerző:  nyalka17 [ 2014.04.11. 15:00 ]
Hozzászólás témája:  Re: Híres Vip! Nemesis és Túlélő vásár help !

DarkAngel^^ írta:
na, szóval te nem azt akkarod hogy pl a túlélőt a zombi ne vehesék ? Meg a snipert? Ha azt akkarod ez privát lesz!


pontosan így szeretném de én pedig nem montam honnan tudtad de már latom privibe elküldted köszönöm DarkAngel^^!!!!!

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