Updating a faction name
#1

I have this command:
Quote:

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;
}

I get no warnings and errors, I have defined everything etc but when i do the cmd then the faction name on the end how can i like update it?

I also have:
Quote:

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;
}

But I dont think it will list all the faction name's, since it's only szFacName and nothing to do with the numbers, so how can I make it in order if that makes sense

+rep
Reply
#2

bump!
Reply
#3

bump, someone please|!
Reply
#4

Show me your faction System
Reply
#5

Quote:

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],
}

Quote:

new
arrFaction[MAX_GROUPS][eFactionInfo];

There
Reply
#6

bumpp
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)