Raised This Month: $32 Target: $400
 8% 

5 or more dhud and hud messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hakim Azizov
Member
Join Date: Mar 2023
Old 11-28-2023 , 09:56   5 or more dhud and hud messages
Reply With Quote #1

Is it possible to show more than one hud (dhud) message at the same time? My .sma files using hud and dhud below. I request you to review my files. any help is always appreciated
Attached Files
File Type: sma Get Plugin or Get Source (ze_auto_restart.sma - 28 views - 2.0 KB)
File Type: sma Get Plugin or Get Source (ze_bullet_damage.sma - 30 views - 2.4 KB)
File Type: sma Get Plugin or Get Source (ze_countdown.sma - 27 views - 6.7 KB)
File Type: sma Get Plugin or Get Source (ze_hud_info.sma - 25 views - 1.2 KB)
File Type: sma Get Plugin or Get Source (ze_vip.sma - 32 views - 33.8 KB)
Hakim Azizov is offline
Hakim Azizov
Member
Join Date: Mar 2023
Old 11-29-2023 , 10:44   Re: 5 or more dhud and hud messages
Reply With Quote #2

no any help?
Hakim Azizov is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 11-29-2023 , 19:08   Re: 5 or more dhud and hud messages
Reply With Quote #3

hud/dhug messages are limited to 4 channels, you can't have 5
lexzor is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-30-2023 , 09:48   Re: 5 or more dhud and hud messages
Reply With Quote #4

dhud limit is 8 and regular hud is 4 for a total of 12. avoid using syncmsg and spamming them. if possible, use manual channel management for regular hud to avoid removal of unwanted huds(not tested).
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Hakim Azizov
Member
Join Date: Mar 2023
Old 11-30-2023 , 11:34   Re: 5 or more dhud and hud messages
Reply With Quote #5

Quote:
Originally Posted by georgik57 View Post
dhud limit is 8 and regular hud is 4 for a total of 12. avoid using syncmsg and spamming them. if possible, use manual channel management for regular hud to avoid removal of unwanted huds(not tested).
hmm. i need 4 hud (may be dhud) messages (player's stats, admin-vip count, score hud and speedometer) which these messages every time will be shown. And i need hud (may be dhud) messages for ze_auto_restart.sma, ze_countdown.sma and zombie_escape.sma file (round end messages), these hud (dhud) messages willn't be called every time
Hakim Azizov is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-30-2023 , 12:29   Re: 5 or more dhud and hud messages
Reply With Quote #6

try using hud messages with fixed channel for what needs to be spammed more frequent than 1/s like the speedometer and dhud for messages that you need to show once or per second or less. note that regular hud messages are small and don't auto resize based on player game resolution like dhud does.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Hakim Azizov
Member
Join Date: Mar 2023
Old 11-30-2023 , 12:50   Re: 5 or more dhud and hud messages
Reply With Quote #7

Quote:
Originally Posted by georgik57 View Post
try using hud messages with fixed channel for what needs to be spammed more frequent than 1/s like the speedometer and dhud for messages that you need to show once or per second or less. note that regular hud messages are small and don't auto resize based on player game resolution like dhud does.
understood i will do it, thanks man,

Last edited by Hakim Azizov; 12-01-2023 at 10:14.
Hakim Azizov is offline
Hakim Azizov
Member
Join Date: Mar 2023
Old 12-01-2023 , 10:14   Re: 5 or more dhud and hud messages
Reply With Quote #8

(NOTE)
hmm, How should I do to show HUD messages?

1) with this way?
Code:
#include <amxmodx>

new g_hud1, g_hud2

public plugin_init( )
{
          set_task(1.0, "hud1")
          set_task(1.0, "hud2")
          g_hud1 = CreateHudSyncObj()
          g_hud2 = CreateHudSyncObj()
}

public hud1()
{
          set_task(1.0, "hud1")
          set_hudmessage(255, 255, 255, -1.0, 0.05, 0, 6.0, 1.0)
          ShowSyncHudMsg(0, g_hud1, "hud 1")
}
public hud2()
{
          set_task(1.0, "hud2")
          set_hudmessage(255, 255, 255, -0.5, 0.02, 0, 6.0, 1.0)
          ShowSyncHudMsg(0, g_hud2, "hud 2")
}



2) or with this way?
Code:
#include <amxmodx>

new g_hud1, g_hud2

public plugin_init( )
{
          set_task(1.0, "hud1")
          set_task(1.0, "hud2")
          g_hud1 = CreateHudSyncObj(1)
          g_hud2 = CreateHudSyncObj(2)
}

public hud1()
{
          set_task(1.0, "hud1")
          set_hudmessage(255, 255, 255, -1.0, 0.05, 0, 6.0, 1.0)
          ShowSyncHudMsg(0, g_hud1, "hud 1")
}
public hud2()
{
          set_task(1.0, "hud2")
          set_hudmessage(255, 255, 255, -0.5, 0.02, 0, 6.0, 1.0)
          ShowSyncHudMsg(0, g_hud2, "hud 2")
}



3) or with this way?
Code:
#include <amxmodx>

public plugin_init( )
{
          set_task(1.0, "hud1")
          set_task(1.0, "hud2")
}

public hud1()
{
          set_task(1.0, "hud1")
          set_hudmessage(255, 255, 255, -1.0, 0.05, 0, 6.0, 1.0)
          show_hudmessage(0, "hud 1")
}
public hud2()
{
          set_task(1.0, "hud2")
          set_hudmessage(255, 255, 255, -0.5, 0.02, 0, 6.0, 1.0)
          show_hudmessage(0, "hud 2")
}
Hakim Azizov is offline
Tote
Senior Member
Join Date: Jul 2023
Old 12-01-2023 , 11:39   Re: 5 or more dhud and hud messages
Reply With Quote #9

use 1 hud/dhud message and use all in it
for ex

show_dhudmessage(id, "Name %s^nClass:%s", name, class[id])

TO GO MORE BELOW YOU CAN USE ^n^n more time or just specify location in set dhudmessage

Last edited by Tote; 12-01-2023 at 11:39.
Tote is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 12-01-2023 , 12:55   Re: 5 or more dhud and hud messages
Reply With Quote #10

3rd one, and use a fixed channel like i said(last parameter from set_hudmessage with a number from 1 to 4)
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode