Raised This Month: $51 Target: $400
 12% 

dhud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 04-13-2020 , 11:55   dhud
Reply With Quote #1

Hello
I want to put two dhud messages in a different color
There is a problem
An example
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>

public plugin_init()
{
    
set_task(0.1,"test1",_,_,_,"b")
    
set_task(0.1,"test2",_,_,_,"b")
}

public 
test1()
{
    
set_dhudmessage(25500, -1.00.006.01.0)
    
show_dhudmessage(0"Test 111111111111111111111111Test11111111111111111111111 Test")


public 
test2()
{
    
set_dhudmessage(02550, -1.00.106.01.0)
    
show_dhudmessage(0"Test 222222222222222222222222222Test222222222222222222222 Test")

If I put them this way, they are not permanent, that is, they turn on and off

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>

public plugin_init()
{
    
set_task(0.1,"test",_,_,_,"b")
}

public 
test()
{
    
set_dhudmessage(25500, -1.00.006.01.0)
    
show_dhudmessage(0"Test 111111111111111111111111Test11111111111111111111111 Test")
    
set_dhudmessage(02550, -1.00.106.01.0)
    
show_dhudmessage(0"Test 222222222222222222222222222Test222222222222222222222 Test")

And if I put it that way Error
SZ_GetSpace: overflow on Client Datagram
WARNING: msg overflowed for nick
I receive
amirwolf is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-13-2020 , 12:00   Re: dhud
Reply With Quote #2

set hudmessage hold time to 0.1 and check what it does. It makes no sense holding hudmessages for 1second while u repeat the task ever 0.1 seconds.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-13-2020 , 14:31   Re: dhud
Reply With Quote #3

There are a total of 8 DHUD channels you can use. Here you're displaying 20 different messages each second. Set both holdtime and set_task time to 1.0.
__________________

Last edited by OciXCrom; 04-13-2020 at 14:32.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-13-2020 , 14:48   Re: dhud
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
There are a total of 8 DHUD channels you can use. Here you're displaying 20 different messages each second. Set both holdtime and set_task time to 1.0.
Yea exactly, 0,1 is too short of an interval to show hudmessages, should've noticed.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply



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 22:56.


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