Colours
#1

So In my script i made some commands and in the commands theres some usage:/me [action] stuff for example and i seted it to the colour light blue what happens shows up in dark blue I set whisper to yellow and it appears in light blue
the /me command was suposed to be green and is dark blue i dont understand whats happening is the color format different? where should i get my colours from
Reply
#2

can you give us the code please.
Reply
#3

How are you defining the colours?
Reply
#4

Post the command
Reply
#5

Goto http://www.rgbtohex.net/

Play with the values 0-255 to find the colour you prefer.

An example: If you add 255, 0, 0 (red), it will be shown as: #FF0000

Take that and do:
pawn Код:
#define COLOR_RED 0xFF0000FF
// 0x at the beginning and FF at the end.
// The hex it gave you without the # in front.


// Another example of yellow:
#define COLOR_YELLOW 0xFFFF00FF
Reply
#6

Quote:
Originally Posted by Blackazur
Посмотреть сообщение
can you give us the code please.
Код:
//Color Defines

#define COLOUR_RED 0xFF0000
#define COLOUR_GREEN 0x33CC33
#define COLOUR_YELLOW 0xFFFF00
#define COLOUR_LIGHTYELLOW 0xFFFFCC
#define COLOUR_MEGREEN 0x99FF00
#define COLOUR_LTBLUE 0x33FF99
#define WHISPER_YELLOW 0xFFCC33
#define USAGE_COLOR 0x33CCCC
Код:
CMD:whisper(playerid, params[])
{
    new pname[MAX_PLAYER_NAME], str[128], Float:pPos[3];
    if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, 0x33CCCC, "USAGE: /whisper [text]");
    GetPlayerName(playerid, pname, sizeof(pname));
    GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, 10.0, pPos[0], pPos[1], pPos[2]))
        {
            format(str, sizeof(str), "Whisper from %s: %s", pname, params);
            SendClientMessage(i, WHISPER_YELLOW, str);
        }
    }
    return 1;
}
Reply
#7

You should add a "FF" at the end of every color define.
Reply
#8

Код:
CMD:whisper(playerid, params[])
{
    new pname[MAX_PLAYER_NAME], str[128], Float:pPos[3];
    if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, 0x33CCCC, "USAGE: /whisper [text]");
    GetPlayerName(playerid, pname, sizeof(pname));
    GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, 10.0, pPos[0], pPos[1], pPos[2]))
        {
            format(str, sizeof(str), "{FFF700}Whisper from %s: %s", pname, params);
            SendClientMessage(i, WHISPER_YELLOW, str);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)