24.05.2017, 15:11
Код:
CMD:setgangcolor(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 4) { if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 4) { SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty."); return 1; } new string[128], family, color; if(sscanf(params, "ix", family, color)) { SendClientMessageEx(playerid, COLOR_GRAD1, "USAGE: /setgangcolor [Familyid] [Hex Color]"); return 1; } if(family < 0 || family > 14) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Gang ID."); if(FamilyInfo[family][FamilyTaken] == 0) { SendClientMessage(playerid, COLOR_GREY, " That gang isn't being used."); return 1; } FamilyInfo[family][FamilyBandana]; format(string, sizeof(string), "AdmCmd: %s has set gang ID %d's bandana to '%x'.", GetPlayerNameEx(playerid), family, color); ABroadCast(COLOR_LIGHTRED, string, 1); } return 1; }