28.02.2014, 18:56
pawn Код:
CMD:factioninfo(playerid, params[])
{
new
string[128], string2[256], id;
if(sscanf(params, "d", id)) return SendClientMessage(playerid, COLOR_GREY, "[Usage]: /factioninfo [factionID]");
if(id < 1 || id > 10 ) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction ID.");
for(new f = 1;f < sizeof(FactionInfo);f++)
{
if(f == id)
{
SCM(playerid, COLOR_GREEN, "_______________________________"COL_WHITE"[FACTION INFO]"COL_GREEN"_______________________________");
format(string, sizeof(string), "Name: %s", FactionInfo[id][fName]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Members: %d", FactionInfo[id][fMembers]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string2, sizeof(string2), "Information: %s", FactionInfo[id][fInformation]);
SendClientMessage(playerid, COLOR_WHITE, string2);
break;
}
}
return 1;
}
pawn Код:
if(f == id)