10.11.2011, 23:05
Hey,
How can i make a kickall command that only kicks non admin players?
Thanks inadvance
How can i make a kickall command that only kicks non admin players?
Thanks inadvance
if(!strcmp(cmdtext, "/kickall", true, 8))
{
for(new i = 0; i < MAX_PLAYERS; i++))
{
if(!IsPlayerAdmin(i))
{
if(IsPlayerConnected(i))
{
SendClientMessageToAll(-1,"All Players Have Been Kicked From The Server By An Admin.");
Kick(i);
return 1;
} else return SendClientMessage(playerid,-1,"There Are No Players Connected.");
}
}
}
if(!strcmp("/kickall", cmdtext, true))
{
for(new i; i < MAX_PLAYERS; i++)
{
if(pInfo[i][pLevel] < 1)
{
if(IsPlayerConnected(i))
{
Kick(i);
}
}
}
return 1;
}