AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Message color (https://forums.alliedmods.net/showthread.php?t=318512)

MihailoZ 09-04-2019 10:15

Message color
 
I would like to edit the color of this message "show_hudmessage(plr, "Ready Or Not, Here We Come!");"

This is the code.

Code:

team = cs_get_user_team(plr);
                        if( team == HNS_TEAM_SEEKER || team == HNS_TEAM_HIDER )
                        {
                                if( team == HNS_TEAM_SEEKER && g_bAlive[plr] )
                                {
                                        make_ScreenFade(plr, 0.0, 0.0, 0, 0, 0, 255);
                                       
                                        cs_reset_user_maxspeed(plr);
                                        //set_pev(plr, pev_flags, pev(plr, pev_flags) & ~FL_FROZEN);
                                }
                               
                                set_hudmessage(hud_red, hud_green, hud_blue, -1.0, -1.0, 0, 0.0, 3.0, 0.1, 0.1, 1);
                                show_hudmessage(plr, "Ready Or Not, Here We Come!");
                               
                                param[0] = _:team;
                                taskGiveWeapons(param, plr + TASK_ID_GIVEWEAPONS)


MihailoZ 09-04-2019 10:21

Re: Message color
 
Is it okay if I just change hud_red, hud_green, hud_blue ?

SHIELD755 09-04-2019 10:31

Re: Message color
 
Quote:

Originally Posted by MihailoZ (Post 2665834)
Is it okay if I just change hud_red, hud_green, hud_blue ?

you must write RGB color code , in place of hud_red , hud_green, hud_blue
for example :-

RED Color hud (255,0,0)

PHP Code:

set_hudmessage(25500, -1.0, -1.000.03.00.10.11);
        
show_hudmessage(plr"Ready Or Not, Here We Come!"); 

you can get color code from here CLICK HERE

DON KHAN 1 09-04-2019 11:37

Re: Message color
 
another example is using colors by const them with HUD_COLOR.

put this
PHP Code:

new const HUD_COLOR[3] = {255 0

then use this code.

PHP Code:

team cs_get_user_team(plr);
            if( 
team == HNS_TEAM_SEEKER || team == HNS_TEAM_HIDER )
            {
                if( 
team == HNS_TEAM_SEEKER && g_bAlive[plr] )
                {
                    
make_ScreenFade(plr0.00.0000255);
                    
                    
cs_reset_user_maxspeed(plr);
                    
//set_pev(plr, pev_flags, pev(plr, pev_flags) & ~FL_FROZEN);
                
}
                
                
set_hudmessage(HUD_COLOR[0], HUD_COLOR[1], HUD_COLOR[2], -1.0, -1.000.03.00.10.11);
                
show_hudmessage(plr"Ready Or Not, Here We Come!");
                
                
param[0] = _:team;
                
taskGiveWeapons(paramplr TASK_ID_GIVEWEAPONS

this will help u for random color hud message.

LearninG 09-04-2019 11:55

Re: Message color
 
Quote:

Originally Posted by DON KHAN 1 (Post 2665851)
this will help u for random color hud message.

how is this supposed to make random colors ?
Code:
new const HUD_COLOR[3] = {0 , 255 , 0}

thEsp 09-04-2019 12:11

Re: Message color
 
Quote:

Originally Posted by LearninG (Post 2665856)
how is this supposed to make random colors ?
Code:
new const HUD_COLOR[3] = {0 , 255 , 0}

By rote.
Quote:

Originally Posted by DON KHAN 1 (Post 2665851)
another example is using colors by const them with HUD_COLOR.

What "const them" means tho?

I AM NOOB 09-04-2019 12:20

Re: Message color
 
Quote:

Originally Posted by DON KHAN 1 (Post 2665851)
this will help u for random color hud message.

For random number why don't use random_num(0,255)

LearninG 09-04-2019 12:50

Re: Message color
 
Quote:

Originally Posted by thEsp (Post 2665858)
By rote.

I didn't understand , sorry.


Quote:

Originally Posted by I AM NOOB (Post 2665861)
For random number why don't use random_num(0,255)

why not ? :
Code:
random(255)


btw i see somewhere
Code:
random(256)
which is right ?

DON KHAN 1 09-04-2019 13:53

Re: Message color
 
Quote:

"Never think yourself as successfull ror DON because "
DON stands for DONKEY OF NATION

GIVE RESPECT = TAKE RESPECT

"Adding much reply in forum will not make you veteran Member"

ONLY SIGNATURE , NO PERSONAL
Ahahah thank u for giving me lot of request ... but NVM cuz i don't mind theme types of my insult & about veteran member as u can see my posts & can understand how i got this.

anyways thEsp i added const them by mistake sorry about that.

LearninG i also saw them in plugins but mostly random(255) but not pretty confirm which is right.

thEsp 09-04-2019 17:57

Re: Message color
 
Quote:

"Adding much reply in forum will not make you veteran Member"
Posting insultive and useless replies in this forum won't help you become a veteran member. You are here just to provoke and insult other people no matter who they are. Bullshit posting won't help you in any case, just thank god there is no admin active at the moment... :salty::salty::salty:


All times are GMT -4. The time now is 17:28.

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