Raised This Month: $ Target: $400
 0% 

[SOLVED] HUD message via Format


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-15-2015 , 08:21   [SOLVED] HUD message via Format
Reply With Quote #1

How the heck do i add a line displaying the value of a cvar at the bottom of the hud message? or in betwen the [Hud Info] line and the player's names ?

I tried and tried and i always end up with the value displayed in the right of every player's name or worst with values from other hud message...

PHP Code:
    get_data_index(idPlayers)
    for(new 
ig_MyData[id][Members]; i++) 
    {
        
        
user Players[i]
        
        if(
Count)
            
add(MyMsgcharsmax(MyMsg), "^n")
        
        
format(MyMsgcharsmax(MyMsg), "%s%s"strlen(MyMsg) ? MyMsg "[Info HUD]^n"g_MyData[user][UserName])
        
Count++
    }
        
    
set_hudmessage(2552552550.020.2006.01.0);
    
show_hudmessage(idMyMsg

Last edited by Depresie; 10-17-2015 at 12:21.
Depresie is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-16-2015 , 13:21   Re: [HELP] HUD message via Format
Reply With Quote #2

updated main post...
Depresie is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 10-17-2015 , 10:24   Re: [HELP] HUD message via Format
Reply With Quote #3

Mess with the ^n?

^n = ENTER space (for one row)

Forget about it I totally have no idea about 'format' stuff

Last edited by Chihuahuax; 10-17-2015 at 10:25.
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-17-2015 , 12:20   Re: [HELP] HUD message via Format
Reply With Quote #4

the problem was the message was displayed more than one time, it was displayed on every line, anyway i solved it, i wasted 2 days messing with the format line when i could of done it like this ->

Code:
show_hudmessage(id, "%s^%s", MyMsg, cvar)  
Depresie 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 22:05.


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