Raised This Month: $ Target: $400
 0% 

[resolved]Set a hudmessage indefinitely.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
stupok
Veteran Member
Join Date: Feb 2006
Old 11-19-2006 , 14:45   [resolved]Set a hudmessage indefinitely.
Reply With Quote #1

I don't want to use set_task(0.1, ...) because I want a hudmessage on the player's screen at all times so I don't need a function to execute every tenth of a second.

All the combinations of values for set_hudmessage()'s holdtime make no difference. I don't see why the value is even included.

This plugin displays a hudmessage for a fraction of a second, every second. The holdtime is 2.0 seconds... ??? I changed fxtime to 0.0, 0.1, no difference.

Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         set_task(1.0, "show_msg", 0, "", 0, "b") } public show_msg() {     //set_hudmessage(red, green, blue, Float:x, Float:y, effects, Float:fxtime, Float:holdtime, Float:fadeintime, Float:fadeouttime, channel)     set_hudmessage(255, 0, 0, 0.0, 0.95, 0, 2.0, 2.0, 0.1, 0.1, -1)     show_hudmessage(0, "blahblahblah") }

Last edited by stupok; 11-19-2006 at 15:43.
stupok is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 11-19-2006 , 15:16   Re: Set a hudmessage indefinitely.
Reply With Quote #2

From my testing, it seems that you have to use set_task(0.1, ...) with hudmessages. Lame.

I say [resolved] because I just used the set_task(0.1, ...) and it works just as it should. I was hoping hudmessages worked differently.

Last edited by stupok; 11-19-2006 at 20:31.
stupok is offline
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 11-21-2006 , 06:49   Re: [resolved]Set a hudmessage indefinitely.
Reply With Quote #3

u mean holdtime param can not exceed 2 secs?!

fx_time is implemented only if effects param is not 0 (see HLDSK).
Simon Logic is offline
Send a message via Skype™ to Simon Logic
The Specialist
BANNED
Join Date: Nov 2006
Old 11-21-2006 , 07:26   Re: [resolved]Set a hudmessage indefinitely.
Reply With Quote #4

status messages is displayed constantly on the players screen with out using CPU exspensive set_task functions
The Specialist is offline
Send a message via AIM to The Specialist
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:53.


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