AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set_hudmessage without disappearing? (https://forums.alliedmods.net/showthread.php?t=233332)

linuxas 01-13-2014 07:08

set_hudmessage without disappearing?
 
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.. :D

YamiKaitou 01-13-2014 07:23

Re: set_hudmessage bug
 
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.

linuxas 01-13-2014 07:41

Re: set_hudmessage bug
 
Quote:

Originally Posted by YamiKaitou (Post 2085293)
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?

YamiKaitou 01-13-2014 08:49

Re: set_hudmessage without disappearing?
 
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.

linuxas 01-13-2014 09:02

Re: set_hudmessage without disappearing?
 
Quote:

Originally Posted by YamiKaitou (Post 2085314)
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?

YamiKaitou 01-13-2014 10:16

Re: set_hudmessage without disappearing?
 
SayText or dHUD (uses 8 channels instead of 4) or StatusText are other methods

linuxas 01-13-2014 10:39

Re: set_hudmessage without disappearing?
 
Quote:

Originally Posted by YamiKaitou (Post 2085369)
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!!!!!!

connoisseur 01-14-2014 00:55

Re: set_hudmessage without disappearing?
 
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.

kasu007 01-16-2014 06:05

Re: set_hudmessage without disappearing?
 
Quote:

Originally Posted by connoisseur (Post 2085647)
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?

xxwantedxx 01-16-2014 06:31

Re: set_hudmessage without disappearing?
 
do u want DHUD text ? Health: Class: AmmoPacks: Armor:

with DHUD ? if u want i have it, i have it for ZP 4.3 and ZPA :) if u want :) PM me or post here


All times are GMT -4. The time now is 10:08.

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