Raised This Month: $ Target: $400
 0% 

Writing 2 hudmessages at the same time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-23-2011 , 07:06   Writing 2 hudmessages at the same time
Reply With Quote #1

I built in a mode of mine that when it reaches some point it types a hud message in blue, but at the meanwhile its about to come up, there's another hudmessage that refreshes every 1 seconds, so the blue message doesnt display because of thehudmessage that refreshes every 1 second....
How can I write them both at the same time without them refraining from each other to display?
Diegorkable is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-23-2011 , 07:19   Re: Writing 2 hudmessages at the same time
Reply With Quote #2

ShowSyncHudMsg mayby ?
.Dare Devil. is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-23-2011 , 07:20   Re: Writing 2 hudmessages at the same time
Reply With Quote #3

can you expand please and tell me more about it? and give me an example of a full use of this? with all parameters? I don't know that function, I know scripting very very good, but since im new to Pawn im new to its scripting functions aswell.
Diegorkable is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-23-2011 , 07:24   Re: Writing 2 hudmessages at the same time
Reply With Quote #4

PHP Code:
 
new g_MsgSync
 
public plugin_init()
{
          
g_MsgSync CreateHudSyncObj()

now you can show hud message like this

set_hudmessage(150, 0, 0, -1.0, -1.0, 1, 0.5, 2.0, 1.0, 1.0, -1)
ShowSyncHudMsg(id, g_MsgSync, "Your new hud message")
.Dare Devil. is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-23-2011 , 07:25   Re: Writing 2 hudmessages at the same time
Reply With Quote #5

And.... will it show it even if there's another HUD message displayed?
Diegorkable is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-23-2011 , 07:56   Re: Writing 2 hudmessages at the same time
Reply With Quote #6

Quote:
Originally Posted by Diegorkable View Post
And.... will it show it even if there's another HUD message displayed?
Yeah, if you want 2 hud messages then just make like this

PHP Code:
 
new g_MsgSync2
 
public plugin_init()
{
          
g_MsgSync2 CreateHudSyncObj()

and

set_hudmessage(150, 0, 0, -1.0, -1.0, 1, 0.5, 2.0, 1.0, 1.0, -1)
ShowSyncHudMsg(id, g_MsgSync2, "Your new hud message")

then its working
.Dare Devil. is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-23-2011 , 09:44   Re: Writing 2 hudmessages at the same time
Reply With Quote #7

I believe sync huds are only useful if you wanted to ensure that you do not overwrite earlier message. Somehow because you want the messages to show at the same time, the correct way to do this is to use two channels. In case you did not still get it the channel is the last parameter in the setting native, so this should be different( or -1 how probably ) in the two messages.
SnoW is offline
Send a message via MSN to SnoW
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-23-2011 , 09:45   Re: Writing 2 hudmessages at the same time
Reply With Quote #8

SnoW - can you give me an example of how to use the show_hudmessage to make them display at the same time?
Diegorkable is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-23-2011 , 10:46   Re: Writing 2 hudmessages at the same time
Reply With Quote #9

It is not about displaying but setting the hud message.

Code:
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 );

The channel ( the last parameter ) should not be the same in the messages you want to show at the same time. Set the messages separately and set the both channels to -1.
SnoW is offline
Send a message via MSN to SnoW
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-23-2011 , 10:57   Re: Writing 2 hudmessages at the same time
Reply With Quote #10

But if I want to put each hudmessage in another channel, why would I set them all to -1?
Diegorkable 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 01:11.


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