Problem with Command /setgangcolor
#2

pawn Код:
CMD:setgangcolor(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pGangModerator] >= 1)
    {
        new family, color[15];
        if(sscanf(params, "is[15]", family, color)) SendClientMessageEx(playerid, COLOR_GRAD1, "USAGE: /setgangcolor [gangID] [hexcolor]");
        else if(family < 1 || family > 10) SendClientMessage(playerid, COLOR_WHITE, "Invalid Gang ID.");
        else if(strlen(color) > 6) SendClientMessage(playerid, COLOR_GREY, "Please use hex codes that arent longer then 6 charaters e.g FFFFFF");
        else
        {
            family -= 1;
            if(FamilyInfo[family][FamilyTaken] != 1) SendClientMessage(playerid, COLOR_GREY, "   That gang isn't being used.");
            else if(PlayerInfo[playerid][pAdminDuty] == 0) SendClientMessage(playerid, -1, "You must be ( /aduty ) to use this Command!");
            else
            {
                new string[128];
                FamilyInfo[family][FamilyBandana][0] = EOS;
                strcat(FamilyInfo[family][FamilyBandana], color, 6);
                format(string, sizeof(string), "AdmCmd: %s has set gang ID %d's bandana to '%s'.", GetPlayerNameEx(playerid), family+1, color);
                ABroadCast(COLOR_LIGHTRED, string, 1);
                SaveGangs();
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Problem with Command /setgangcolor - by Alpha000 - 17.10.2015, 15:45
Re: Problem with Command /setgangcolor - by Jefff - 17.10.2015, 16:15
Re: Problem with Command /setgangcolor - by Alpha000 - 17.10.2015, 17:39
Re: Problem with Command /setgangcolor - by Jefff - 17.10.2015, 18:38
Re: Problem with Command /setgangcolor - by Alpha000 - 17.10.2015, 20:38

Forum Jump:


Users browsing this thread: 1 Guest(s)