hlmod.hu
https://hlmod.hu/

Jelenlegi mód
https://hlmod.hu/viewtopic.php?f=9&t=6544
Oldal: 1 / 1

Szerző:  pixxa112 [2012.11.06. 18:55 ]
Hozzászólás témája:  Jelenlegi mód

Hali.

Ebbe a pluginba, valaki bele tudná írni, hogy ezeket írja:

Jelenlegi mód

Kovetkezo palya
Pontos ido
Jo jatekot

És úgy kell, hogy a jelenlegi mód külön legyen egy enterrel a többi info-tól
előre is köszi :D



SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <zombieplague>
  3.  
  4. /*================================================================================
  5.  [Customizations]
  6. =================================================================================*/
  7.  
  8. // Hudmessage tag
  9. new const hud_tag[] = "Jelenlegi mod: "
  10.  
  11. // Name for each Hudmessage Mode
  12. new const mode_names[][] =
  13. {
  14. "Varakozas az uj modra...", // No mode Started
  15. "Normal fertozeses", // Normal Infection, single round
  16. "Nemesis mod", // Nemesis Mode (zombie boss)
  17. "Tulelo mod", // Survivor Mode (human boss)
  18. "Raj mod", // Swarm round (no infections)
  19. "Tobbszoros fertozeses mod", // Multiple Infection (like single round, but, more than 1 zombie)
  20. "Pestis mod", // Plague round (nemesis & zombies vs. survivors & humans)
  21. "Ismeretlen mod", // An unofficial mode (edited/created/modified by user)
  22. "Sniper mod",
  23. "Assassin mod"
  24. }
  25.  
  26. // RGB Colors for each Hudmessage Mode
  27. // See here some RGB Colors: http://web.njit.edu/~kevin/rgb.txt.html
  28. new const rgb_hud_colors[sizeof(mode_names)][3] =
  29. {
  30. // R G B
  31. {255, 255, 255}, // No mode Started
  32. {0, 255, 0}, // Normal Infection, single round
  33. {255, 0, 0}, // Nemesis Mode (zombie boss)
  34. {0, 0, 255}, // Survivor Mode (human boss)
  35. {255, 255, 0}, // Swarm round (no infections)
  36. {0, 255, 0}, // Multiple Infection (like single round, but, more than 1 zombie)
  37. {255, 0, 0}, // Plague round (nemesis & zombies vs. survivors & humans)
  38. {255, 255, 255} , // An unofficial mode (edited/created/modified by user)
  39. {255, 255, 255},
  40. {255, 0, 255}
  41. }
  42.  
  43. // X Hudmessage Position ( --- )
  44. const Float:HUD_MODE_X = 0.65
  45.  
  46. // Y Hudmessage Position ( ||| )
  47. const Float:HUD_MODE_Y = 0.2
  48.  
  49. // Time at which the Hudmessage is displayed. (when user is puted into the Server)
  50. const Float:START_TIME = 3.0
  51.  
  52. /*================================================================================
  53.  Customization ends here! Yes, that's it. Editing anything beyond
  54.  here is not officially supported. Proceed at your own risk...
  55. =================================================================================*/
  56.  
  57. // Variables
  58. new g_SyncHud, g_Mode
  59.  
  60. // Cvar pointers
  61. new cvar_enable, cvar_central
  62.  
  63. public plugin_init()
  64. {
  65. // Plugin Info
  66. register_plugin("[ZP] Addon: Display the Current Mode", "0.1.6", "meTaLiCroSS")
  67.  
  68. // Round Start Event
  69. register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
  70.  
  71. // Enable Cvar
  72. cvar_enable = register_cvar("zp_display_mode", "1")
  73.  
  74. // Server Cvar
  75. register_cvar("zp_addon_dtcm", "v0.1.6 by meTaLiCroSS", FCVAR_SERVER|FCVAR_SPONLY)
  76.  
  77. // Variables
  78. g_SyncHud = CreateHudSyncObj()
  79.  
  80. // Getting "zp_on" cvar
  81. if(cvar_exists("zp_on"))
  82. cvar_central = get_cvar_pointer("zp_on")
  83.  
  84. // If Zombie Plague is not running (bugfix)
  85. if(!get_pcvar_num(cvar_central))
  86. pause("a")
  87. }
  88.  
  89. public client_putinserver(id)
  90. {
  91. // Setting Hud
  92. set_task(START_TIME, "mode_hud", id, _, _, "b")
  93. }
  94.  
  95. public event_RoundStart()
  96. {
  97. // Update var (no mode started / in delay)
  98. g_Mode = 0
  99. }
  100.  
  101. public mode_hud(id)
  102. {
  103. // If the Cvar isn't enabled
  104. if(!get_pcvar_num(cvar_enable))
  105. return;
  106.  
  107. // Hud Options
  108. set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_X, HUD_MODE_Y, 0, 6.0, 12.0)
  109.  
  110. // Now the hud appears
  111. ShowSyncHudMsg(id, g_SyncHud, "%s%s", (g_Mode == 0 ? "" : hud_tag), mode_names[g_Mode])
  112. }
  113.  
  114. public zp_round_started(mode, id)
  115. {
  116. // Update var with Mode num
  117. g_Mode = mode
  118.  
  119. // An unofficial mode
  120. if(!(1 <= mode < (sizeof(mode_names) - 1)))
  121. g_Mode = sizeof(mode_names) - 1
  122. }
  123.  
  124. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  125. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  126. */

Szerző:  small [2012.11.06. 19:41 ]
Hozzászólás témája:  Re: Jelenlegi mód

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <zombieplague>
  3.  
  4. /*================================================================================
  5. [Customizations]
  6. =================================================================================*/
  7.  
  8. // Hudmessage tag
  9. new const hud_tag[] = "Jelenlegi mod: "
  10.  
  11. // Name for each Hudmessage Mode
  12. new const mode_names[][] =
  13. {
  14. "Varakozas az uj modra...", // No mode Started
  15. "Normal fertozeses", // Normal Infection, single round
  16. "Nemesis mod", // Nemesis Mode (zombie boss)
  17. "Tulelo mod", // Survivor Mode (human boss)
  18. "Raj mod", // Swarm round (no infections)
  19. "Tobbszoros fertozeses mod", // Multiple Infection (like single round, but, more than 1 zombie)
  20. "Pestis mod", // Plague round (nemesis & zombies vs. survivors & humans)
  21. "Ismeretlen mod", // An unofficial mode (edited/created/modified by user)
  22. "Sniper mod",
  23. "Assassin mod"
  24. }
  25.  
  26. // RGB Colors for each Hudmessage Mode
  27. // See here some RGB Colors: http://web.njit.edu/~kevin/rgb.txt.html
  28. new const rgb_hud_colors[sizeof(mode_names)][3] =
  29. {
  30. // R G B
  31. {255, 255, 255}, // No mode Started
  32. {0, 255, 0}, // Normal Infection, single round
  33. {255, 0, 0}, // Nemesis Mode (zombie boss)
  34. {0, 0, 255}, // Survivor Mode (human boss)
  35. {255, 255, 0}, // Swarm round (no infections)
  36. {0, 255, 0}, // Multiple Infection (like single round, but, more than 1 zombie)
  37. {255, 0, 0}, // Plague round (nemesis & zombies vs. survivors & humans)
  38. {255, 255, 255} , // An unofficial mode (edited/created/modified by user)
  39. {255, 255, 255},
  40. {255, 0, 255}
  41. }
  42.  
  43. // X Hudmessage Position ( --- )
  44. const Float:HUD_MODE_X = 0.65
  45.  
  46. // Y Hudmessage Position ( ||| )
  47. const Float:HUD_MODE_Y = 0.2
  48.  
  49. // Time at which the Hudmessage is displayed. (when user is puted into the Server)
  50. const Float:START_TIME = 3.0
  51.  
  52. /*================================================================================
  53. Customization ends here! Yes, that's it. Editing anything beyond
  54. here is not officially supported. Proceed at your own risk...
  55. =================================================================================*/
  56.  
  57. // Variables
  58. new g_SyncHud, g_Mode
  59.  
  60. // Cvar pointers
  61. new cvar_enable, cvar_central
  62.  
  63. public plugin_init()
  64. {
  65. set_task(1.0,"hud",0)
  66.  
  67. // Plugin Info
  68. register_plugin("[ZP] Addon: Display the Current Mode", "0.1.6", "meTaLiCroSS")
  69.  
  70. // Round Start Event
  71. register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
  72.  
  73. // Enable Cvar
  74. cvar_enable = register_cvar("zp_display_mode", "1")
  75.  
  76. // Server Cvar
  77. register_cvar("zp_addon_dtcm", "v0.1.6 by meTaLiCroSS", FCVAR_SERVER|FCVAR_SPONLY)
  78.  
  79. // Variables
  80. g_SyncHud = CreateHudSyncObj()
  81.  
  82. // Getting "zp_on" cvar
  83. if(cvar_exists("zp_on"))
  84. cvar_central = get_cvar_pointer("zp_on")
  85.  
  86. // If Zombie Plague is not running (bugfix)
  87. if(!get_pcvar_num(cvar_central))
  88. pause("a")
  89. }
  90.  
  91. public client_putinserver(id)
  92. {
  93. // Setting Hud
  94. set_task(START_TIME, "mode_hud", id, _, _, "b")
  95. }
  96.  
  97. public event_RoundStart()
  98. {
  99. // Update var (no mode started / in delay)
  100. g_Mode = 0
  101. }
  102.  
  103. public mode_hud(id)
  104. {
  105. // If the Cvar isn't enabled
  106. if(!get_pcvar_num(cvar_enable))
  107. return;
  108.  
  109. // Hud Options
  110. set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_X, HUD_MODE_Y, 0, 6.0, 12.0)
  111.  
  112. // Now the hud appears
  113. ShowSyncHudMsg(id, g_SyncHud, "%s%s", (g_Mode == 0 ? "" : hud_tag), mode_names[g_Mode])
  114. }
  115.  
  116. public zp_round_started(mode, id)
  117. {
  118. // Update var with Mode num
  119. g_Mode = mode
  120.  
  121. // An unofficial mode
  122. if(!(1 <= mode < (sizeof(mode_names) - 1)))
  123. g_Mode = sizeof(mode_names) - 1
  124. }
  125.  
  126. public hud()
  127. {
  128. new palya[25]
  129. new ido[9]
  130.  
  131. get_time(%H:%M:%S, ido, 8)
  132. get_cvar_string("amx_nextmap",palya,24)
  133.  
  134. {
  135. set_hudmessage(0, 255, 0, 0.01, 0.28, 0, 6.0, 12.0)
  136. show_hudmessage(id, "Jelenlegi Mod:%d^n^nKovetkezo Palya: %d^nPontos Ido: %s^nJo Jatekot!",mode_names,ido,palya)
  137. }
  138. }

Szerző:  pixxa112 [2012.11.06. 20:32 ]
Hozzászólás témája:  Re: Jelenlegi mód

Köszi :D

Szerző:  pixxa112 [2012.11.06. 20:35 ]
Hozzászólás témája:  Re: Jelenlegi mód

Nem jó nem konvertálja le:

HIBA:
SMA Forráskód: [ Mindet kijelol ]
  1. 099665f57d27.sma(131) : error 029: invalid expression, assumed zero
  2. 5099665f57d27.sma(131) : error 029: invalid expression, assumed zero
  3. 5099665f57d27.sma(131) : error 029: invalid expression, assumed zero
  4. 5099665f57d27.sma(131) : fatal error 107: too many error messages on one line
  5.  

Szerző:  small [2012.11.07. 17:16 ]
Hozzászólás témája:  Re: Jelenlegi mód

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <zombieplague>
  3.  
  4. /*================================================================================
  5. [Customizations]
  6. =================================================================================*/
  7.  
  8. // Hudmessage tag
  9. new const hud_tag[] = "Jelenlegi mod: "
  10.  
  11. // Name for each Hudmessage Mode
  12. new const mode_names[][] =
  13. {
  14. "Varakozas az uj modra...", // No mode Started
  15. "Normal fertozeses", // Normal Infection, single round
  16. "Nemesis mod", // Nemesis Mode (zombie boss)
  17. "Tulelo mod", // Survivor Mode (human boss)
  18. "Raj mod", // Swarm round (no infections)
  19. "Tobbszoros fertozeses mod", // Multiple Infection (like single round, but, more than 1 zombie)
  20. "Pestis mod", // Plague round (nemesis & zombies vs. survivors & humans)
  21. "Ismeretlen mod", // An unofficial mode (edited/created/modified by user)
  22. "Sniper mod",
  23. "Assassin mod"
  24. }
  25.  
  26. // RGB Colors for each Hudmessage Mode
  27. // See here some RGB Colors: http://web.njit.edu/~kevin/rgb.txt.html
  28. new const rgb_hud_colors[sizeof(mode_names)][3] =
  29. {
  30. // R G B
  31. {255, 255, 255}, // No mode Started
  32. {0, 255, 0}, // Normal Infection, single round
  33. {255, 0, 0}, // Nemesis Mode (zombie boss)
  34. {0, 0, 255}, // Survivor Mode (human boss)
  35. {255, 255, 0}, // Swarm round (no infections)
  36. {0, 255, 0}, // Multiple Infection (like single round, but, more than 1 zombie)
  37. {255, 0, 0}, // Plague round (nemesis & zombies vs. survivors & humans)
  38. {255, 255, 255} , // An unofficial mode (edited/created/modified by user)
  39. {255, 255, 255},
  40. {255, 0, 255}
  41. }
  42.  
  43. // X Hudmessage Position ( --- )
  44. const Float:HUD_MODE_X = 0.65
  45.  
  46. // Y Hudmessage Position ( ||| )
  47. const Float:HUD_MODE_Y = 0.2
  48.  
  49. // Time at which the Hudmessage is displayed. (when user is puted into the Server)
  50. const Float:START_TIME = 3.0
  51.  
  52. /*================================================================================
  53. Customization ends here! Yes, that's it. Editing anything beyond
  54. here is not officially supported. Proceed at your own risk...
  55. =================================================================================*/
  56.  
  57. // Variables
  58. new g_SyncHud, g_Mode
  59.  
  60. // Cvar pointers
  61. new cvar_enable, cvar_central
  62.  
  63. public plugin_init()
  64. {
  65. set_task(1.0,"hud",0)
  66.  
  67. // Plugin Info
  68. register_plugin("[ZP] Addon: Display the Current Mode", "0.1.6", "meTaLiCroSS")
  69.  
  70. // Round Start Event
  71. register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
  72.  
  73. // Enable Cvar
  74. cvar_enable = register_cvar("zp_display_mode", "1")
  75.  
  76. // Server Cvar
  77. register_cvar("zp_addon_dtcm", "v0.1.6 by meTaLiCroSS", FCVAR_SERVER|FCVAR_SPONLY)
  78.  
  79. // Variables
  80. g_SyncHud = CreateHudSyncObj()
  81.  
  82. // Getting "zp_on" cvar
  83. if(cvar_exists("zp_on"))
  84. cvar_central = get_cvar_pointer("zp_on")
  85.  
  86. // If Zombie Plague is not running (bugfix)
  87. if(!get_pcvar_num(cvar_central))
  88. pause("a")
  89. }
  90.  
  91. public client_putinserver(id)
  92. {
  93. // Setting Hud
  94. set_task(START_TIME, "mode_hud", id, _, _, "b")
  95. }
  96.  
  97. public event_RoundStart()
  98. {
  99. // Update var (no mode started / in delay)
  100. g_Mode = 0
  101. }
  102.  
  103. public mode_hud(id)
  104. {
  105. // If the Cvar isn't enabled
  106. if(!get_pcvar_num(cvar_enable))
  107. return;
  108.  
  109. // Hud Options
  110. set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_X, HUD_MODE_Y, 0, 6.0, 12.0)
  111.  
  112. // Now the hud appears
  113. ShowSyncHudMsg(id, g_SyncHud, "%s%s", (g_Mode == 0 ? "" : hud_tag), mode_names[g_Mode])
  114. }
  115.  
  116. public zp_round_started(mode, id)
  117. {
  118. // Update var with Mode num
  119. g_Mode = mode
  120.  
  121. // An unofficial mode
  122. if(!(1 <= mode < (sizeof(mode_names) - 1)))
  123. g_Mode = sizeof(mode_names) - 1
  124. }
  125.  
  126. public hud()
  127. {
  128. new palya[25]
  129. new ido[9]
  130.  
  131. get_time("%H:%M:%S",ido,8)
  132. get_cvar_string("amx_nextmap",palya,24)
  133.  
  134. {
  135. set_hudmessage(0, 255, 0, 0.01, 0.28, 0, 6.0, 12.0)
  136. show_hudmessage(0, "Jelenlegi Mod:%d^n^nKovetkezo Palya: %d^nPontos Ido: %s^nJo Jatekot!",mode_names,ido,palya)
  137. }
  138. }

Szerző:  pixxa112 [2012.11.07. 17:21 ]
Hozzászólás témája:  Re: Jelenlegi mód

Köszönöm :D

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