CMD:editfacs(playerid, params[]) { new facnumber = MAX_GROUPS, iFac; new szFacName[64], string[64]; if(PlayerInfo[playerid][pAdmin] >= 5) { if(sscanf(params, "ds[64]", facnumber, szFacName)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /compromote [playerid] [rank (1 - 4)]"); if(facnumber > 12 || facnumber < 0) { SendClientMessageEx(playerid, COLOR_YELLOW, "Don't go below number 0 or above number 12!"); return 1; } if(arrFaction[iFac][g_szFactionName]) { format(string, sizeof(string), "You have updated faction ID %D to %s.", facnumber, szFacName); SendClientMessageEx(playerid, COLOR_WHITE, string); } } return 1; } |
CMD:listfactions(playerid, params[]) { new string[128], iFac, szFacName = arrFaction[iFac][g_szFactionName]; SendClientMessage(playerid, COLOR_GREEN, "|____FACTION LIST____|"); format(string, sizeof(string), "1) %s | 2) %s 3) %s 4) %s 5) %s", szFacName); SendClientMessageEx(playerid, COLOR_WHITE, string); SendClientMessage(playerid, COLOR_GREEN, "|____________________|"); return 1; } |
enum eFactionInfo { g_FactionID, g_iFactionType, g_szFactionName[GROUP_MAX_NAME_LEN], g_iLockerGuns[MAX_GROUP_WEAPONS], g_iLockerCost[MAX_GROUP_WEAPONS], g_iAllegiance, g_iBugAccess, g_iChatAccess, g_iRadioAccess, g_iDeptRadioAccess, g_hDutyColour, g_hRadioColour, g_iShareAssets, g_iLockerStock, Float: g_fLockerPos[3], g_iLockerVW, Float: g_fCratePos[3], Text3D: g_t3DLabels[2], } |
new arrFaction[MAX_GROUPS][eFactionInfo]; |