Raised This Month: $ Target: $400
 0% 

[SOLVED] Variable in HUD help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 01-27-2013 , 03:12   [SOLVED] Variable in HUD help
Reply With Quote #1

PHP Code:
public Left_20(id)
{
    
set_hudmessage(255255255, -1.00.2612.0iSeconds0.10.11)
    if(
is_user_alive(id))
    {
        switch(
cs_get_user_team(id))
    {
        case 
CS_TEAM_Tshow_hudmessageid"Seekers Are Frozen So You Can Hide!");
        case 
CS_TEAM_CTshow_hudmessageid"Hiders Get %d Secs To Hide!"iSeconds);
        case 
CS_TEAM_SPECTATOR: return;
        case 
CS_TEAM_UNASSIGNED: return;
    }
    }

the CT hud shows a bunch of numbers instead of the 20.0 seconds as defined...

PHP Code:
#define iSeconds 20.0 
what im doing wrong?

Last edited by Blizzard_87; 01-27-2013 at 03:45.
Blizzard_87 is offline
michal123
Junior Member
Join Date: Feb 2011
Location: Poland
Old 01-27-2013 , 03:22   Re: Variable in HUD help
Reply With Quote #2

Use floatround.

Code:
public Left_20(id) { 
	set_hudmessage(255, 255, 255, -1.0, 0.26, 1, 2.0, iSeconds, 0.1, 0.1, 1);
	if(is_user_alive(id)){ 
		switch(cs_get_user_team(id)){ 
			case CS_TEAM_T: show_hudmessage( id, "Seekers Are Frozen So You Can Hide!"); 
			case CS_TEAM_CT: show_hudmessage( id, "Hiders Get %d Secs To Hide!", floatround(iSeconds)); 
		} 
	} 
}
michal123 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 01-27-2013 , 03:45   Re: Variable in HUD help
Reply With Quote #3

cheers thanks

Worked!
Blizzard_87 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 20:40.


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