AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hud channels not work (https://forums.alliedmods.net/showthread.php?t=272064)

Laoming 09-23-2015 09:11

Hud channels not work
 
Hello all. I have one problem on my server, i have zombie_plague (complete edited). My problem is that hud messages still disappears or do not show.
But i have hud channels created...so why hud messages not showing?

I tried to use classic hud channels:

Code:

new random_iHud

random_iHud = CreateSyncHudObj();

this not work for me. So i tried to use this system:

Code:

// Hud channely
#define HUDID_KOLA        0
#define HUDID_INFEKCE    1
#define HUDID_VYVONEME        2
#define HUDID_NEMESIS    3
#define HUDID_ANTIDOTE    4
#define HUDID_LISTASPECT        5
#define HUDID_LISTAALIVE        6
#define HUDID_SECRETGUN        7
#define HUDID_OSTATNI        8
#define MAXIMUM_HUDS    9

new g_iHudChannel[ MAXIMUM_HUDS ];

// Create the HUD Sync Objects       
        for( new i=0; i < MAXIMUM_HUDS; i++ )
        {               
                g_iHudChannel[ i ] =  CreateHudSyncObj( );
        }

And put to hud message:

Code:

set_hudmessage(60, 240, 40, 0.30, 0.15, 0, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_iHudChannel[HUDID_ANTIDOTE], "%L", LANG_PLAYER, "NOTICE_ANTIDOTE", g_playername[id])

or

set_hudmessage(30, 50, 225, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_iHudChannel[HUDID_VYVONEME], "%L", LANG_PLAYER, "NOTICE_PLAGUE")

Why is not working?

Laoming 09-28-2015 03:21

Re: Hud channels not work
 
That nobody knows? I ned fix this problem :\...

zmd94 09-28-2015 07:07

Re: Hud channels not work
 
Just do as below:
Code:

set_hudmessage(30, 50, 225, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, CreateSyncHudObj(), "%L", LANG_PLAYER, "NOTICE_PLAGUE")



All times are GMT -4. The time now is 22:07.

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