Raised This Month: $ Target: $400
 0% 

How to make the HUD always displayed and updated?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
a8966338
Junior Member
Join Date: Jun 2011
Old 06-23-2012 , 01:16   How to make the HUD always displayed and updated?
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>


public plugin_init()
{
register_plugin("testing""1.0""Testing")
register_clcmd("say /test""test")
}


public 
test(id)
{
new 
money cs_get_user_money(id)
if( 
money >= 0)
{
set_hudmessage(255000.360.5406.012.0)
show_hudmessage(id"%d"money)



}
else
{
client_print(idprint_chat"you don't have money")


}

How to make the HUD always displayed and updated?
I hope it is always displayed on the screen
Not for some time to disappear
If the money to change, how to make the HUD also follow the change?
a8966338 is offline
hyphen
Senior Member
Join Date: Aug 2011
Old 06-23-2012 , 02:04   Re: How to make the HUD always displayed and updated?
Reply With Quote #2

You can set a timer to start the hud again & again just after its timeout.
hyphen is offline
a8966338
Junior Member
Join Date: Jun 2011
Old 06-23-2012 , 02:12   Re: How to make the HUD always displayed and updated?
Reply With Quote #3

Quote:
Originally Posted by hyphen View Post
You can set a timer to start the hud again & again just after its timeout.
How can I set?
Can you help me?
and how can always show?
a8966338 is offline
hyphen
Senior Member
Join Date: Aug 2011
Old 06-23-2012 , 02:46   Re: How to make the HUD always displayed and updated?
Reply With Quote #4

Actually Im not very sure which parameter of set_hudmessage() actually responsible for message time to stay on screen. Here is the function signature.

set_hudmessage ( red=200, green=100, blue=0, Float=-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 )

If anyone here can point this out that will be helpful, and then after elapsing that time just start a timer to start this set_hudmessage again and continue this until player disconnects.
hyphen is offline
a8966338
Junior Member
Join Date: Jun 2011
Old 06-23-2012 , 03:20   Re: How to make the HUD always displayed and updated?
Reply With Quote #5

Quote:
Originally Posted by hyphen View Post
Actually Im not very sure which parameter of set_hudmessage() actually responsible for message time to stay on screen. Here is the function signature.

set_hudmessage ( red=200, green=100, blue=0, Float=-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 )

If anyone here can point this out that will be helpful, and then after elapsing that time just start a timer to start this set_hudmessage again and continue this until player disconnects.
oH! Turned out to be
How to make it real-time updates
Can you give me sma?
SOR.. my sma not very good
and my English else not very good
Because I am form Taiwan
but my TChinese is good
a8966338 is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-23-2012 , 07:11   Re: How to make the HUD always displayed and updated?
Reply With Quote #6

Make an infinite task that will show the HUD to all players with a loop.
__________________
<VeCo> is offline
a8966338
Junior Member
Join Date: Jun 2011
Old 06-23-2012 , 08:28   Re: How to make the HUD always displayed and updated?
Reply With Quote #7

Quote:
Originally Posted by <VeCo> View Post
Make an infinite task that will show the HUD to all players with a loop.
How can I make an infinite task?
Excuse me ,can you do the demonstration?
a8966338 is offline
GordonFreeman (RU)
Veteran Member
Join Date: Jan 2010
Location: Uzbekistan
Old 06-23-2012 , 08:42   Re: How to make the HUD always displayed and updated?
Reply With Quote #8

Code:
set_task(1.0,"myawesometask",id,.flags="b")
__________________
The functional way is the right way
GordonFreeman (RU) is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 06-23-2012 , 09:40  
Reply With Quote #9

Creat a sync hud and put a long ass timer on it lol... Then call the hud function when you want it updated

With what your trying to do the task works better

Last edited by Doc-Holiday; 06-23-2012 at 09:41.
Doc-Holiday is offline
a8966338
Junior Member
Join Date: Jun 2011
Old 06-24-2012 , 00:35   Re: How to make the HUD always displayed and updated?
Reply With Quote #10

Quote:
Originally Posted by GordonFreeman (RU) View Post
Code:
set_task(1.0,"myawesometask",id,.flags="b")
very thank
a8966338 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 06:14.


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