hlmod.hu
https://hlmod.hu/

Kör kezdás előtt
https://hlmod.hu/viewtopic.php?f=9&t=9784
Oldal: 1 / 1

Szerző:  ChaspeR [2013.07.31. 14:31 ]
Hozzászólás témája:  Kör kezdás előtt

Hogyan lehetne megoldani , hogy amíg a kör el nem kezdődik addig ne lehessen megvenni?!
Tehát csak ha megy a mód , utána!
ÉS NEMESIS MÓDBAN NE LEHESSEN VÁSÁROLNI!:)

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <zombieplague>
  3. #include <ekezet>
  4.  
  5. #define PLUGIN "[ZP] Extra Item: T-Virus"
  6. #define VERSION "1.0"
  7. #define AUTHOR "fezh"
  8.  
  9. new g_virus
  10. const g_cost = 67
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15. g_virus = zp_register_extra_item("T-Virus(ZmLeszel)", g_cost, ZP_TEAM_HUMAN)
  16. }
  17.  
  18. public zp_extra_item_selected(id, itemid)
  19. {
  20. if (itemid == g_virus)
  21. {
  22. if(zp_get_user_zombie(id))
  23. return;
  24.  
  25. zp_infect_user(id)
  26. set_task(1.0, "check_zombie", id)
  27. }
  28. }
  29.  
  30. public check_zombie(id)
  31. {
  32. if(zp_get_user_zombie(id))
  33. {
  34. new name[32]
  35. get_user_name(id, name, 31)
  36. set_hudmessage(255, 0, 0, -0.05, -0.45, 1, 0.0, 5.0, 1.0, 1.0, -1)
  37. show_hudmessage(0, "%s megfertőzve a T-Virus által!", name)
  38. }
  39. else
  40. {
  41. new ammopacks
  42. ammopacks = zp_get_user_ammo_packs(id)
  43. zp_set_user_ammo_packs(id, ammopacks + g_cost)
  44. }
  45. }
  46.  

Szerző:  Vinnice [2013.07.31. 15:17 ]
Hozzászólás témája:  Re: Kör kezdás előtt

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <zombieplague>
  4. #include <ekezet>
  5.  
  6. #define PLUGIN "[ZP] Extra Item: T-Virus"
  7. #define VERSION "1.0"
  8. #define AUTHOR "fezh"
  9.  
  10. new g_virus
  11. const g_cost = 67
  12. new bool:buy
  13. new g_count;
  14.  
  15. public plugin_init()
  16. {
  17. register_plugin(PLUGIN, VERSION, AUTHOR)
  18. g_virus = zp_register_extra_item("T-Virus(ZmLeszel)", g_cost, ZP_TEAM_HUMAN)
  19. register_logevent("startcount",2,"1=Round_Start")
  20. register_logevent("end",2,"1=Round_End")
  21. g_count = register_cvar("zp_tvirus","10.0")
  22. }
  23. public startcount()
  24. {
  25. set_task(get_pcvar_float(g_count),"enged")
  26. }
  27. public enged()
  28. {
  29. buy = true;
  30. }
  31. public end()
  32. {
  33. buy = false
  34. }
  35. public zp_extra_item_selected(id, itemid)
  36. {
  37. if (itemid == g_virus)
  38. {
  39. if(buy)
  40. {
  41. if(zp_get_user_zombie(id))
  42. return;
  43.  
  44. zp_infect_user(id)
  45. set_task(1.0, "check_zombie", id)
  46. }
  47. else
  48. {
  49. client_print(id, print_chat, "A kor keztete elott nem veheted meg!")
  50. }
  51. }
  52. }
  53.  
  54. public check_zombie(id)
  55. {
  56. if(zp_get_user_zombie(id))
  57. {
  58. new name[32]
  59. get_user_name(id, name, 31)
  60. set_hudmessage(255, 0, 0, -0.05, -0.45, 1, 0.0, 5.0, 1.0, 1.0, -1)
  61. show_hudmessage(0, "%s megfertőzve a T-Virus által!", name)
  62. }
  63. else
  64. {
  65. new ammopacks
  66. ammopacks = zp_get_user_ammo_packs(id)
  67. zp_set_user_ammo_packs(id, ammopacks + g_cost)
  68. }
  69. }

Teszt Nem volt.

Szerző:  Show1337 [2013.07.31. 15:19 ]
Hozzászólás témája:  Re: Kör kezdás előtt

Nekem az 5.0.8 -as Zombie Plague Módom van, és én ezt használom. Előröl írtam, de hogy ne szúrja a szemeteket kivettem magam az author-bol.

SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studió */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <zombieplague>
  6. #include <zp50_core>
  7. #include <zp50_items>
  8. #include <zp50_colorchat>
  9. #include <zp50_class_survivor>
  10. #include <zp50_class_nemesis>
  11.  
  12. new Virus
  13. new const Cost = 75
  14.  
  15. public plugin_init ()
  16. {
  17. Virus = zp_items_register("T-Virus \r( Zm Leszel )", Cost)
  18. }
  19.  
  20. public plugin_precache()
  21. {
  22. precache_sound("zombie_plague/bbc/t-virus.wav")
  23. }
  24.  
  25. public zp_fw_items_select_pre(id, itemid, ignorecost)
  26. {
  27. if (itemid == Virus)
  28. {
  29. if (zp_class_nemesis_get(id) || zp_core_is_zombie(id) || zp_class_survivor_get(id))
  30. {
  31. return ZP_ITEM_DONT_SHOW;
  32. }
  33. else
  34. {
  35. if (!zp_has_round_started() || zp_is_plague_round() || zp_is_swarm_round() || zp_is_nemesis_round() || zp_is_survivor_round() || zp_get_user_last_human(id))
  36. {
  37. return ZP_ITEM_NOT_AVAILABLE;
  38. }
  39. else
  40. {
  41. return ZP_ITEM_AVAILABLE;
  42. }
  43. }
  44. }
  45. return ZP_ITEM_AVAILABLE;
  46. }
  47.  
  48. public zp_fw_items_select_post(id, itemid, ignorecost)
  49. {
  50. if (itemid == Virus)
  51. {
  52. if (!zp_has_round_started() || zp_is_plague_round() || zp_is_swarm_round() || zp_is_nemesis_round() || zp_is_survivor_round() || zp_get_user_last_human(id))
  53. {
  54. return ZP_ITEM_NOT_AVAILABLE;
  55. }
  56. else
  57. {
  58. zp_infect_user( id, 0, 1, 0 )
  59. zp_colored_print(id, "Megfetőzted magad T-Virussal!" )
  60. client_cmd(0, "spk zombie_plague/bbc/t-virus.wav")
  61. return ZP_ITEM_AVAILABLE;
  62. }
  63. }
  64. return ZP_ITEM_AVAILABLE;
  65. }


UI.: Igen, ez félig 5.0.8 -as félig nem, mert nem találtam melyik include fájlban van az a feltétel, hogy a kör elkezdődött-e, vagy sem.

Szerző:  Show1337 [2013.07.31. 15:20 ]
Hozzászólás témája:  Re: Kör kezdás előtt

Vinnice írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <zombieplague>
  4. #include <ekezet>
  5. &nbsp;
  6. #define PLUGIN "[ZP] Extra Item: T-Virus"
  7. #define VERSION "1.0"
  8. #define AUTHOR "fezh"
  9. &nbsp;
  10. new g_virus
  11. const g_cost = 67
  12. new bool:buy
  13. new g_count;
  14. &nbsp;
  15. public plugin_init()
  16. {
  17. register_plugin(PLUGIN, VERSION, AUTHOR)
  18. g_virus = zp_register_extra_item("T-Virus(ZmLeszel)", g_cost, ZP_TEAM_HUMAN)
  19. register_logevent("startcount",2,"1=Round_Start")
  20. register_logevent("end",2,"1=Round_End")
  21. g_count = register_cvar("zp_tvirus","10.0")
  22. }
  23. public startcount()
  24. {
  25. set_task(get_pcvar_float(g_count),"enged")
  26. }
  27. public enged()
  28. {
  29. buy = true;
  30. }
  31. public end()
  32. {
  33. buy = false
  34. }
  35. public zp_extra_item_selected(id, itemid)
  36. {
  37. if (itemid == g_virus)
  38. {
  39. if(buy)
  40. {
  41. if(zp_get_user_zombie(id))
  42. return;
  43. &nbsp;
  44. zp_infect_user(id)
  45. set_task(1.0, "check_zombie", id)
  46. }
  47. else
  48. {
  49. client_print(id, print_chat, "A kor keztete elott nem veheted meg!")
  50. }
  51. }
  52. }
  53. &nbsp;
  54. public check_zombie(id)
  55. {
  56. if(zp_get_user_zombie(id))
  57. {
  58. new name[32]
  59. get_user_name(id, name, 31)
  60. set_hudmessage(255, 0, 0, -0.05, -0.45, 1, 0.0, 5.0, 1.0, 1.0, -1)
  61. show_hudmessage(0, "%s megfertőzve a T-Virus által!", name)
  62. }
  63. else
  64. {
  65. new ammopacks
  66. ammopacks = zp_get_user_ammo_packs(id)
  67. zp_set_user_ammo_packs(id, ammopacks + g_cost)
  68. }
  69. }

Teszt Nem volt.


Te jó ég, szerintem úgy gondolta, hogy a zombi módban nem kezdődött el a kör.

Szerző:  ChaspeR [2013.07.31. 19:09 ]
Hozzászólás témája:  Re: Kör kezdás előtt

Nekem nem 5.0-ás kell ... Ez amit ide írtam! Rossz még mindig meg lehet vásárolni a mód kezdése előtt , és nemesis módban is :S

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