Raised This Month: $ Target: $400
 0% 

Solved Can't make colored DHUD message (noob)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 08-25-2021 , 07:10   Can't make colored DHUD message (noob)
Reply With Quote #1

So I wanna ask some help from SUPER MEGA PRO scripters.
When i show message it appears in white color
PHP Code:
// define colors
enum _:sc {
    
sc_OLD 0,
    
sc_CT,
    
sc_T,
    
sc_WHITE,
}

new 
color_R[sc] = {251185232200}
new 
color_G[sc] = {126211211200}
new 
color_B[sc] = {20234141200}

// somewhere in the code I run a simple task
public message_send(taskid)
{
    static 
selected
    
    
switch(someStatement)
    {
        case 
1:
        {
            
selected sc_CT
        
}
        case 
2:
        {
            
selected sc_T
        
}
        case 
3:
        {
            
selected sc_WHITE
        
}
    }
    
    static 
rgb
    
    r 
color_R[selected]
    
color_G[selected]
    
color_B[selected]
    
    
// format message
    
static szText[128]
    
formatex(szTextcharsmax(szText), "Some text here")
    
    
// set color and show message
    // everything is predetermined here except color and everything works except color
    
set_dhudmessage(rgbpos_Xpos_YDH_FXDH_FX_TIMEDH_HOLD_TIMEDH_FADEINDH_FADEOUT)
    
show_dhudmessage(0szText)

__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 08-25-2021 at 12:28.
kww is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 08-25-2021 , 09:44   Re: Can't make colored DHUD message (noob)
Reply With Quote #2

Well, it's obvious that your "someStatement" is returning value 3, so check where you set it's value.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 08-25-2021 , 12:29   Re: Can't make colored DHUD message (noob)
Reply With Quote #3

oh man it worked but colors are too bright in cs 1.6
When I picked 'em in photoshop they looked nice
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951
kww 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 15:38.


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