Command to SetPlayerColor by Choice.
#1

I tryed something like this but it gives me an error with SetPlayerColor. I do not posses the necessary knowledge with these Hex colors and stuff -_-

pawn Код:
COMMAND:groupcolor(playerid, params[])
{
    new i = group[playerid][gid];
        if(groupinfo[i][leader] == playerid)
    {
        new color[7];
        if(sscanf(params, "h", color) || strlen(params) != 6)
            SendClientMessage(playerid, -1, "{FF0000}Invalid hex color!");
        else
        {
            new msg[56];
            format(msg, sizeof(msg), "{%s}Your group color has been changed!", params);
            SendClientMessage(playerid, -1, msg);
            format(groupinfo[i][GroupColor], 7, "%s", params);
                        SetPlayerColor(playerid, group[i][GroupColor]); //HexToInt is not working either. And how do i deal with the transparency parameters ? Like if i wanna set 50 as default ?
        }
    }
    else
        SendClientMessage(playerid, -1, "{FF0000}You must be a group leader to use this command!");
    return 1;
}
Reply


Messages In This Thread
Command to SetPlayerColor by Choice. - by verlaj - 04.03.2017, 15:31
Re: Command to SetPlayerColor by Choice. - by Konstantinos - 04.03.2017, 17:48

Forum Jump:


Users browsing this thread: 1 Guest(s)