AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] HUD message via Format (https://forums.alliedmods.net/showthread.php?t=273214)

Depresie 10-15-2015 08:21

[SOLVED] HUD message via Format
 
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


Depresie 10-16-2015 13:21

Re: [HELP] HUD message via Format
 
updated main post...

Chihuahuax 10-17-2015 10:24

Re: [HELP] HUD message via Format
 
Mess with the ^n?

^n = ENTER space (for one row)

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

Depresie 10-17-2015 12:20

Re: [HELP] HUD message via Format
 
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


All times are GMT -4. The time now is 22:05.

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