Raised This Month: $ Target: $400
 0% 

Some questions about color codes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Twenty_Cat
Junior Member
Join Date: Feb 2022
Old 05-13-2024 , 22:40   Some questions about color codes
Reply With Quote #1

I want to change the colors in this code, I think it's hexadecimal, but I don't understand x04, x07, what are they again? I tried to change the color but it didn't work, can someone explain it for me?


users[client].exper_num = userEx - (lv * 10);
PrintToChatAll("\x04 players \x07FF0000%s \x04 Level up %d", users[client].user_name, users[client].l_v_num);
}else{
users[client].exper_num = userEx;
if(value>0){
PrintToChat(client,"\x04[Lv]: \x07FF0000%d | \x04 EXP: %d | \x04 EXP: +%d", users[client].l_v_num, users[client].exper_num,value);
}else{
PrintToChat(client,"\x04[Lv]: \x07FF0000%d | \x04 EXP: %d | \x04 EXP: %d", users[client].l_v_num, users[client].exper_num,value);
}
Twenty_Cat is offline
SyntX
Junior Member
Join Date: Sep 2022
Location: Kathmandu, Nepal
Old Yesterday , 08:11   Re: Some questions about color codes
Reply With Quote #2

Quote:
Originally Posted by Twenty_Cat View Post
I want to change the colors in this code, I think it's hexadecimal, but I don't understand x04, x07, what are they again? I tried to change the color but it didn't work, can someone explain it for me?


users[client].exper_num = userEx - (lv * 10);
PrintToChatAll("\x04 players \x07FF0000%s \x04 Level up %d", users[client].user_name, users[client].l_v_num);
}else{
users[client].exper_num = userEx;
if(value>0){
PrintToChat(client,"\x04[Lv]: \x07FF0000%d | \x04 EXP: %d | \x04 EXP: +%d", users[client].l_v_num, users[client].exper_num,value);
}else{
PrintToChat(client,"\x04[Lv]: \x07FF0000%d | \x04 EXP: %d | \x04 EXP: %d", users[client].l_v_num, users[client].exper_num,value);
}

Try using multicolors
Link: https://forums.alliedmods.net/showthread.php?t=247770

Usage:
PHP Code:
PrintToChatAll("\x04 players \x07FF0000%s \x04 Level up %d"users[client].user_nameusers[client].l_v_num); 
PHP Code:
CPrintToChatAll("{colorname} players {colorname}%s {default} Level up %d"users[client].user_nameusers[client].l_v_num); 
__________________
Join Awesome Zombies Server :
Zombie Mod By NovaHunterZ | FastDL, Rank, SSD, Respawn | --> 54.36.111.64:27015
Zombie Riot By NovaHunterZ | FastDL, RPG, SSD, Skins, FreeVIP | --> 54.36.111.64:27025
---------------------------------
Discord Server : https://discord.gg/2DjsQ4xdd5
SyntX 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 05:24.


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