AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   dhud (https://forums.alliedmods.net/showthread.php?t=323153)

amirwolf 04-13-2020 11:55

dhud
 
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

Napoleon_be 04-13-2020 12:00

Re: dhud
 
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.

OciXCrom 04-13-2020 14:31

Re: dhud
 
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.

Napoleon_be 04-13-2020 14:48

Re: dhud
 
Quote:

Originally Posted by OciXCrom (Post 2693163)
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.


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

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