AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [resolved]Set a hudmessage indefinitely. (https://forums.alliedmods.net/showthread.php?t=47512)

stupok 11-19-2006 14:45

[resolved]Set a hudmessage indefinitely.
 
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") }

stupok 11-19-2006 15:16

Re: Set a hudmessage indefinitely.
 
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.

Simon Logic 11-21-2006 06:49

Re: [resolved]Set a hudmessage indefinitely.
 
u mean holdtime param can not exceed 2 secs?!

fx_time is implemented only if effects param is not 0 (see HLDSK).

The Specialist 11-21-2006 07:26

Re: [resolved]Set a hudmessage indefinitely.
 
status messages is displayed constantly on the players screen with out using CPU exspensive set_task functions :wink:


All times are GMT -4. The time now is 06:53.

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