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


Messages In This Thread
Updating a name? - by RLGaming - 29.09.2012, 20:08
Re: Updating a faction name - by RLGaming - 30.09.2012, 00:39
Re: Updating a faction name - by RLGaming - 30.09.2012, 10:25
Re: Updating a faction name - by ToiletDuck - 30.09.2012, 10:43
Re: Updating a faction name - by RLGaming - 30.09.2012, 10:57
Re: Updating a faction name - by RLGaming - 30.09.2012, 12:00

Forum Jump:


Users browsing this thread: 1 Guest(s)