Raised This Month: $ Target: $400
 0% 

"fxtime" parameter (for hudmsgs and dhudmsgs)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-12-2012 , 14:30   "fxtime" parameter (for hudmsgs and dhudmsgs)
Reply With Quote #1

Well, i've been testing the usage of Director HUD Messages for knowing how to use it's parameters, and while testing i've noticed that the "fxtime" param doesn't seem to work for something

I did a testing plugin for this:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "Director HUD Testing"
#define VERSION "0.1"
#define AUTHOR "meTaLiCroSS"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("dhud""clcmd_DirectorHUDMessage")
}

public 
clcmd_DirectorHUDMessage(iId)
{
    new 
messageText32 ]; 
    new 
redColor]; 
    new 
greenColor]; 
    new 
blueColor]; 
    new 
coordX]; 
    new 
coordY]; 
    new 
effectType];
    new 
timeEffect]; 
    new 
timeHold];
    new 
timeFadeIn]; 
    new 
timeFadeOut]; 
    
    
read_argv1messageTextcharsmaxmessageText ) ); 
    
read_argv2redColorcharsmaxredColor ) ); 
    
read_argv3greenColorcharsmaxgreenColor ) ); 
    
read_argv4blueColorcharsmaxblueColor ) ); 
    
read_argv5coordXcharsmaxcoordX ) ); 
    
read_argv6coordYcharsmaxcoordY ) ); 
    
read_argv7effectTypecharsmaxeffectType ) ); 
    
read_argv8timeEffectcharsmaxtimeEffect ) ); 
    
read_argv9timeHoldcharsmaxtimeHold ) ); 
    
read_argv10timeFadeIncharsmaxtimeFadeIn ) ); 
    
read_argv11timeFadeOutcharsmaxtimeFadeOut ) ); 
    
    
DirectorHUDMessage
    
(
        
iId,
        .
szMessage messageText,
        .
iRed str_to_num(redColor),
        .
iGreen str_to_num(greenColor),
        .
iBlue str_to_num(blueColor),
        .
flX str_to_float(coordX),
        .
flY str_to_float(coordY),
        .
iEffect str_to_num(effectType),
        .
flEffectTime str_to_float(timeEffect),
        .
flHoldTime str_to_float(timeHold),
        .
flFadeInTime str_to_float(timeFadeIn),
        .
flFadeOutTime str_to_float(timeFadeOut)
    )
    
    return 
PLUGIN_HANDLED
}

stock DirectorHUDMessage(const iId, const szMessage[], const iRed 0, const iGreen 160, const iBlue 0, const Float:flX = -1.0, const Float:flY 0.65, const iEffect 2, const Float:flEffectTime 6.0, const Float:flHoldTime 3.0, const Float:flFadeInTime 0.1, const Float:flFadeOutTime 1.5)
{
    
message_begin(iId MSG_ONE_UNRELIABLE MSG_BROADCASTSVC_DIRECTOR, .player iId)
    
write_byte(strlen(szMessage) + 31); // size of all write_*
    
write_byte(DRC_CMD_MESSAGE);
    
write_byte(iEffect);
    
write_long(iBlue + (iGreen<<8) + (iRed<<16))
    
write_long(_:flX)
    
write_long(_:flY)
    
write_long(_:flFadeInTime)
    
write_long(_:flFadeOutTime)
    
write_long(_:flHoldTime)
    
write_long(_:flEffectTime)
    
write_string(szMessage);
    
message_end();

So I only need to paste on console:

Code:
dhud DirectorHUDMessageTesting 0 200 200 -1.0 0.15 2 0.0 2.0 0.1 3.0
Let's see:

rgb = { 0, 200, 200 } (skyblue)
pos = { -1.0, 0.15 }
effect = 2 (training room text, writes char by char)
fxtime = 0.0, i've testing using 10.0, 20.0, 30.0 and the hud didn't change at all
holdtime = 2.0, the hudmsg will stay 2 seconds
fadeintime = 0.1, in this case, the time that every char will be printed
fadeouttime = 3.0, when holdtime ends, the time that the message will slowly dissapear

So, my question is

What's the functionality of the "fxtime" parameter, for hudmessages and director hudmessages? It seems that it's the same thing anyway
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-12-2012 , 14:32   Re: "fxtime" parameter (for hudmsgs and dhudmsgs)
Reply With Quote #2

Try to set holdtime greater than fxtime for effect = 2, fxtime is not used on effect == 0 or effect == 1
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 07-12-2012 at 14:33.
ConnorMcLeod is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-12-2012 , 15:19   Re: "fxtime" parameter (for hudmsgs and dhudmsgs)
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
Try to set holdtime greater than fxtime for effect = 2, fxtime is not used on effect == 0 or effect == 1
I tried with:

holdtime = 5.0
fxtime = 3.0

holdtime = 5.0
fxtime = 2.0

holdtime = 5.0
fxtime = 1.0

And it was the same thing on every dhudmsg displayed
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-12-2012 , 16:00   Re: "fxtime" parameter (for hudmsgs and dhudmsgs)
Reply With Quote #4

Try hudmessage
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-12-2012 , 16:49   Re: "fxtime" parameter (for hudmsgs and dhudmsgs)
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
Try hudmessage
Oh i've noticed the difference! Seems that DHud Messages doesn't use the fxtime parameter... I don't think that my CS is wrong, maybe someone could test it too and see which thing happens
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 14:58.


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