24.03.2011, 16:49
pawn Code:
dcmd_makefaction(playerid,params[])
{
new fname[24],fleader[24],fmoney,ftype[24],str[128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"[System] You need to be admin to use this command.");
if(sscanf(params, "s[24]s[24]ds[24]", fname, fleader, fmoney, ftype)) return SendClientMessage(playerid, COLOR_RED, "[System]Usage: /makefaction [Faction Name] [Faction Leader] [Faction Money] [Faction Type]");
format(str,sizeof(str),"You have made Faction: %s with the leader: %s and money: %s Type: %s",fname,fleader,fmoney, ftype);
SendClientMessage(playerid,COLOR_BLUE,str);
for(new i = 0; i < sizeof(FactionInfo); i++)
{
FactionInfo[i][FactionName] = fname;
FactionInfo[i][FactionLeader] = fleader;
FactionInfo[i][FactionMoney] = fmoney;
FactionInfo[i][FactionType] = ftype;
return 1;
}
return 1;
}