Color help
#1

Alright so the issue is quite simple, seems that this wont actually work properly or maybe Im not inserting correct color. Im using Decimal colors

PHP код:
YCMD:setcolor(playerid,params[],help) {
    if(
help) return SCM(playerid,COLOR_RED,"This command is used to change your color in game by inerting certain HexDecimal color");
    if(
GetPlayerVIPLevel(playerid) < 2) return SCM(playerid,COLOR_RED,"You are not VIP level 2+");
    new 
decimalColor[15];
    if(
sscanf(params,"s[15]",decimalColor)) return SCM(playerid,COLOR_RED,"Usage: /setcolor [Decimal color code]");
    
    new 
string[15];
    
format(string,sizeof(string),"%s",decimalColor);
    
strcpy(pStat[playerid][PlayerColour],string,15);
    
ChangePlayerColour(playerid,decimalColor); // SQL stuff, dont worry about it
    
    
new val strval(string);
    
SetPlayerColor(playeridval); 
    return 
true;

Color code example: 3139487
that should be something like greenish type of color according to https://www.mathsisfun.com/hexadecim...al-colors.html

but it turns out blue in game
Reply


Messages In This Thread
Color help - by TwinkiDaBoss - 26.05.2016, 16:10
Re: Color help - by justjamie - 26.05.2016, 16:13
Re: Color help - by TwinkiDaBoss - 26.05.2016, 16:15
Re: Color help - by Dayrion - 26.05.2016, 16:34
Re: Color help - by Konstantinos - 26.05.2016, 16:37
Re: Color help - by Stinged - 26.05.2016, 16:43
Re: Color help - by TwinkiDaBoss - 26.05.2016, 21:58

Forum Jump:


Users browsing this thread: 2 Guest(s)