11.09.2013, 13:34
Here's the line which the error is on:
Here's the whole actual command:
pawn Код:
if(PlayerInfo[playerid][pAdmin] < =99999) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
Here's the whole actual command:
pawn Код:
CMD:purge(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < =99999) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
new f;
if(sscanf(params,"d",f)) return SendClientMessage(playerid, COLOR_GREY, "USAGE:/purge [FactionID]");
if(f < 1 || f > 14 || f == 10) return SendClientMessage(playerid, COLOR_GREY, "Factions range from 1 to 14, 10 is invalid.");
new st[30], str[128];
switch(f)
{
case 1:
{
st = "LSPD";
}
case 2:
{
st = "FBI";
}
case 3:
{
st = "SFPD";
}
case 4:
{
st = "FDSA";
}
case 5:
{
st = "Judicial System";
}
case 6:
{
st = "Government";
}
case 7:
{
st = "SASD";
}
case 8:
{
st = "Hitman Agency";
}
case 9:
{
st = "SA News";
}
case 11:
{
st = "National Guard";
}
case 12:
{
st = "Tierra Robada";
}
case 13:
{
st = "NOOSE";
}
default:
{
return SendClientMessage(playerid, COLOR_GREY, "Invalid faction ID.");
}
}
foreach(Player, i)
{
if(PlayerInfo[i][pMember] == f || PlayerInfo[i][pLeader] == f)
{
SendClientMessage(i, COLOR_RED, "You have been kicked out of your faction by an administrator.");
PlayerInfo[i][pMember] = 0;
PlayerInfo[i][pLeader] = 0;
}
}
format(str, 128, "Online members in %s were purged by %s.", st, GetPlayerNameEx(playerid));
ABroadCast(COLOR_RED, str, 2);
format(str, 128, "%s was purged by %s.", st, GetPlayerNameEx(playerid));
Log("logs/purges.log", str);
return 1;
}