Raised This Month: $ Target: $400
 0% 

set_hudmessage without disappearing?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
linuxas
Member
Join Date: Sep 2013
Old 01-13-2014 , 07:08   set_hudmessage without disappearing?
Reply With Quote #1

Hi I have a little problem. I'm trying to set hudmessage to be shown all the time when round starts...

My code:

PHP Code:
set_hudmessage(25525542, -1.00.201000.01000.01000.00.00.04)
    
show_hudmessage(0"TEXT!"
The problem is that when "TEXT!" is on screen in game, it is showing only until admin writes 4 (four) admin messages (with "@" or with "@@", it doesn't matter...).
It doesn't matter what lenght messages admins writes too, or how fast they do it, but always exactly after fourh admin message "TEXT!" disapears from the screen! I was trying to change cordinates of hudmessage.. The same.
Thank you for you help, sorry for bad english, I was trying to explain.

p.s. I dont know how to make hudmessage to be shown all the time, so I did for 1000 sec..

Last edited by linuxas; 01-13-2014 at 07:49.
linuxas is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-13-2014 , 07:23   Re: set_hudmessage bug
Reply With Quote #2

There is nothing you can do about that as there are only 4 HUD Message channels and amx_tsay and amx_psay cycle through all 4 of them.
__________________
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
linuxas
Member
Join Date: Sep 2013
Old 01-13-2014 , 07:41   Re: set_hudmessage bug
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
There is nothing you can do about that as there are only 4 HUD Message channels and amx_tsay and amx_psay cycle through all 4 of them.
Thats really bad... Is there a way to make message to be shown on screen all the time even when admins writes on screen?
i know some plugins where scripters do that... In example: MeRcyLeZZ "Zombie Plague mod" . In this plugin zombie class, ammo packs is showing all the time at the bottom of screen while player is alive (foto).

PHP Code:
// Show name, health, class, and ammo packs
        
set_hudmessage(255255255HUD_SPECT_XHUD_SPECT_Y06.01.10.00.0, -1)
        
ShowSyncHudMsg(ID_SHOWHUDg_MsgSync2"%L %s^nHP: %d - %L %s - %L %d"ID_SHOWHUD"SPECTATING"g_playername[id], pev(idpev_health), ID_SHOWHUD"CLASS_CLASS", class, ID_SHOWHUD"AMMO_PACKS1"g_ammopacks[id]) 
I copied theese lines from Zombie Plague sma file, it seems to be the same "set_hudmessage". How do they did that then?

Last edited by linuxas; 01-13-2014 at 08:06.
linuxas is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-13-2014 , 08:49   Re: set_hudmessage without disappearing?
Reply With Quote #4

As there are only 4 channels, there is nothing you can do to keep 2 messages on the screen at the same time that are using the same channel.
__________________
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
linuxas
Member
Join Date: Sep 2013
Old 01-13-2014 , 09:02   Re: set_hudmessage without disappearing?
Reply With Quote #5

Quote:
Originally Posted by YamiKaitou View Post
As there are only 4 channels, there is nothing you can do to keep 2 messages on the screen at the same time that are using the same channel.
I understand, but is there a way to write message on screen without channels?
linuxas is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-13-2014 , 10:16   Re: set_hudmessage without disappearing?
Reply With Quote #6

SayText or dHUD (uses 8 channels instead of 4) or StatusText are other methods
__________________
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
linuxas
Member
Join Date: Sep 2013
Old 01-13-2014 , 10:39   Re: set_hudmessage without disappearing?
Reply With Quote #7

Quote:
Originally Posted by YamiKaitou View Post
SayText or dHUD (uses 8 channels instead of 4) or StatusText are other methods
Thank you very much!!! You helped a lot with dhudmessage... It is bether than i wanted before... Thank you!!!!!!

Last edited by linuxas; 01-13-2014 at 10:40.
linuxas is offline
connoisseur
Senior Member
Join Date: Jan 2012
Old 01-14-2014 , 00:55   Re: set_hudmessage without disappearing?
Reply With Quote #8

Some plugins use this method for displaying permanent messages:
Set the channel to -1, this will automatically choose any available channel.
Use set_task with "b" flag to call the HUD message in a loop. This way it will never be removed.
connoisseur is offline
kasu007
Junior Member
Join Date: Jan 2013
Old 01-16-2014 , 06:05   Re: set_hudmessage without disappearing?
Reply With Quote #9

Quote:
Originally Posted by connoisseur View Post
Some plugins use this method for displaying permanent messages:
Set the channel to -1, this will automatically choose any available channel.
Use set_task with "b" flag to call the HUD message in a loop. This way it will never be removed.

and where do you set the b flag?
kasu007 is offline
connoisseur
Senior Member
Join Date: Jan 2012
Old 01-16-2014 , 11:38   Re: set_hudmessage without disappearing?
Reply With Quote #10

Quote:
Originally Posted by kasu007 View Post
and where do you set the b flag?
set_task description
Also you seem new to pawn scripting so here's a little code that will give you some idea:
Spoiler

Last edited by connoisseur; 01-16-2014 at 11:55. Reason: Added code snippet
connoisseur is offline
Reply


Thread Tools
Display Modes

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 10:08.


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