AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How can I use this hud? (https://forums.alliedmods.net/showthread.php?t=328034)

AstRoid 10-22-2020 23:27

How can I use this hud?
 
Hello to all u.u
I wanted to ask you how you can make this type of hud as it appears in the image (which marks the hp, armor and level - xp)

https://i.imgur.com/gj55bwb.jpg

loiraolhosazul 10-22-2020 23:29

Re: How can I use this hud?
 
Quote:

Originally Posted by AstRoid (Post 2722241)
Hello to all u.u
I wanted to ask you how you can make this type of hud as it appears in the image (which marks the hp, armor and level - xp)

https://i.imgur.com/gj55bwb.jpg

nowadays it is not possible.

AstRoid 10-22-2020 23:42

Re: How can I use this hud?
 
So how does this appear in the game? Besides the fact that I already played a server that had that same hud

loiraolhosazul 10-22-2020 23:45

Re: How can I use this hud?
 
Quote:

Originally Posted by AstRoid (Post 2722243)
So how does this appear in the game? Besides the fact that I already played a server that had that same hud

here is the code, you can test it: https://forums.alliedmods.net/showthread.php?p=221113

AstRoid 10-23-2020 00:26

Re: How can I use this hud?
 
is very confusing xd. From what I understand is with client_print_color. Now I don't know how to apply it in my code y.y

fysiks 10-23-2020 00:34

Re: How can I use this hud?
 
Quote:

Originally Posted by AstRoid (Post 2722248)
is very confusing xd. From what I understand is with client_print_color. Now I don't know how to apply it in my code y.y

client_print_color() prints a chat message in the same location as client_print() (which is the lower left corner with the normal chat). It looks like the purple text in the lower right is just a HUD Message.

AstRoid 10-23-2020 00:38

Re: How can I use this hud?
 
Yes. Is the client_print_color
But I already tried it anyway and I don't know how to apply it T.T
PHP Code:

show_hudmessage(id"%L"id"HUD_ADRENALINECOMBO"idg_szAdrenalineUseML[g_iAdrenalineUse[id]], g_iAdrenaline[id], 100

I want this hud to appear as in the picture :/ but it throws me pure error

fysiks 10-23-2020 00:43

Re: How can I use this hud?
 
If you don't provide the code that you implemented and don't show the error, how can anyone help?

AstRoid 10-23-2020 00:48

Re: How can I use this hud?
 
Original:
PHP Code:

    //new szText[100]
    
set_hudmessage(HUD_ADRENALINE)

    if(
g_iAdrenalineUse[id])
        
show_hudmessage(id"%L"id"HUD_ADRENALINECOMBO"idg_szAdrenalineUseML[g_iAdrenalineUse[id]], g_iAdrenaline[id], 100)
    else if(
g_iAdrenaline[id] >= 100)
        
show_hudmessage(id"%L"id"HUD_ADRENALINEFULL")

    else
        
show_hudmessage(id"%L"id"HUD_ADRENALINE"g_iAdrenaline[id], 100)


How I implemented it:
PHP Code:

player_hudAdrenaline(id)
{
    
//new szText[100]
    
set_hudmessage(HUD_ADRENALINE)

    if(
g_iAdrenalineUse[id])
        
//show_hudmessage(id, "%L", id, "HUD_ADRENALINECOMBO", id, g_szAdrenalineUseML[g_iAdrenalineUse[id]], g_iAdrenaline[id], 100)
        
client_print_color(id"%L""HUD_ADRENALINECOMBO"idg_szAdrenalineUseML[g_iAdrenalineUse[id]], g_iAdrenaline[id], 100)
    else if(
g_iAdrenaline[id] >= 100)
        
show_hudmessage(id"%L"id"HUD_ADRENALINEFULL")

    else
        
show_hudmessage(id"%L"id"HUD_ADRENALINE"g_iAdrenaline[id], 100)


Error:
PHP Code:

error 035argument type mismatch (argument 2


Natsheh 10-23-2020 03:39

Re: How can I use this hud?
 
I think you're talking about StatusText message.

here's a link to show you how you can send it.


All times are GMT -4. The time now is 13:48.

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