AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Not disappearing hud (https://forums.alliedmods.net/showthread.php?t=309396)

blAck. 07-24-2018 11:17

Not disappearing hud
 
How can I make a hud which won't disappear?
Like lifetime hud myb...

OciXCrom 07-24-2018 12:54

Re: Not disappearing hud
 
By using a repeating task.

edon1337 07-24-2018 12:57

Re: Not disappearing hud
 
1) Click Search
2) Replace 'lifetime' with 'permanent'
3) Click one of the 122 existing threads with the same problem.

MagNNusS 07-25-2018 06:21

Re: Not disappearing hud
 
By following the source code down below i think you may fix your hud
PHP Code:

#include <amxmodx>
#include <amxmisc>

new const PLUGIN[] = "Hud Info";
new const 
VERSION[] = "1.0";
new const 
AUTHOR[] = "MagNNusS";

new 
show_hud
new syncObj

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
show_hud register_cvar("amx_show_hud""1"/// Write 0 to disable hud!
    
syncObj     CreateHudSyncObj()
}

public 
ShowHud(id)
{
    
set_hudmessage(025500.020.2)
    
ShowSyncHudMsg(idsyncObj,"Add a text over here...")
}

public 
client_putinserver(id)
{
    if(
get_pcvar_num(show_hud) == 1)
        
set_task(1.0"ShowHud"id__"b")


P.S: I didn't tested it! :grrr:

OciXCrom 07-25-2018 08:08

Re: Not disappearing hud
 
Where's remove_task()?

D4rkSiD3Rs 07-25-2018 10:08

Re: Not disappearing hud
 
How many hudmessage you use on the same time on your server ?


All times are GMT -4. The time now is 12:50.

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