Raised This Month: $ Target: $400
 0% 

Hud Messages don't work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 11-11-2014 , 02:23   Re: Hud Messages don't work
Reply With Quote #1

Quote:
Originally Posted by zmd94 View Post
Then, you need to send the message using different channel. ;)
Quote:
Originally Posted by jimaway View Post
showing both messages on the same channel, second message overwrites first one
Channel default value for hudmessage is -1 if you don't set it.
It means random.

The thing what is overwriting is variable SyncHudMessage.
You need 2 different sync object to show 2 hudmessages at same time.
.Dare Devil. is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-11-2014 , 04:32   Re: Hud Messages don't work
Reply With Quote #2

Quote:
Originally Posted by .Dare Devil. View Post
Channel default value for hudmessage is -1 if you don't set it.
It means random.

The thing what is overwriting is variable SyncHudMessage.
You need 2 different sync object to show 2 hudmessages at same time.
As far as i know, it will type one over the other. Wont delete, but that isnt what he wants either...

Andu, dont make 2 hud, here what you do need is to put ^n at the end of first hud and put the second one after it.

PHP Code:
set_hudmessage(422552550.010.9406.01.0);
        
ShowSyncHudMsg(id,SyncHudMessage1"HP : %d       AP : %d ^nCredits : %d"pev(idpev_health),get_user_armor(id), Credits[id]); 
__________________
Jhob94 is online now
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-11-2014 , 04:42   Re: Hud Messages don't work
Reply With Quote #3

Quote:
Originally Posted by Jhob94 View Post
PHP Code:
set_hudmessage(422552550.010.9406.01.0);
        
ShowSyncHudMsg(id,SyncHudMessage"HP : %d       AP : %d ^nCredits : %d"pev(idpev_health),get_user_armor(id), Credits[id]); 
This is better.

I forgot already, that actually we have ^n.
zmd94 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 11-11-2014 , 07:21   Re: Hud Messages don't work
Reply With Quote #4

Quote:
Originally Posted by .Dare Devil. View Post
Channel default value for hudmessage is -1 if you don't set it.
It means random.
default channel is 4 according to amxmodx.inc
Code:
/**
 * Sets format for hudmessage. 
 * Note - as of AMX Mod X 1.61, setting the channel to -1
 *  will automatically choose the next available HUD channel for a player.
 */
native set_hudmessage(red=200, green=100, blue=0, Float:x=-1.0, Float:y=0.35, effects=0, Float:fxtime=6.0, Float:holdtime=12.0, Float:fadeintime=0.1, Float:fadeouttime=0.2,channel=4);
jimaway is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-11-2014 , 09:17   Re: Hud Messages don't work
Reply With Quote #5

Quote:
Originally Posted by jimaway View Post
default channel is 4 according to amxmodx.inc
Quote:
Originally Posted by .Dare Devil. View Post
Channel default value for hudmessage is -1 if you don't set it.
It means random.
You both are correct actually. The default channel is 4 in 1.8.2 and it is -1 in 1.8.3
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Andu.
Member
Join Date: Oct 2013
Location: Belgravistan
Old 11-11-2014 , 11:37   Re: Hud Messages don't work
Reply With Quote #6

Thank you all LY !
Andu. is offline
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 17:32.


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