for(new i = 0; i < MAX_PLAYERS; i++)
{
if (!IsPlayerAdmin(i)) // Change this to your admin variable, but remember to put 'i', not 'playerid'!
{
Kick(i);
}
}
cmd(kickall, playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] < 5) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not the admin level required to do this command!");
else
{
if (PlayerInfo[playerid][pAdminLevel] = 5);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdminLevel] < 1);
{
Kick(i);
}
}
}
return 1;
}
cmd(kickall, playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] < 5) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not the admin level required to do this command!");
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdminLevel] < 1);
{
Kick(i);
}
}
}
return 1;
}
cmd(kickall, playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] < 5) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not the admin level required to do this command!");
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdminLevel] < 1); // this line
{
Kick(i);
}
}
}
return 1;
}
Remove the semicolon from that if statement. (Line 1770 - the error line)
|
cmd(kickall, playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] < 5) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not the admin level required to do this command!");
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdminLevel] == 0)
{
Kick(i);
}
}
}
return 1;
}