18.11.2012, 21:43
How to kick someone if they login as a rcon
public OnRconLoginAttempt(ip[], password[], success)
{
if(success) //If the password was correct
{
new pip[16];
for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true)) //If a player's IP is the IP that succeed the login
{
SendClientMessage(i, 0xFFFFFFFF, "You logged in. Bye!"); //Send a message
Kick(i); //They are now kicked.
}
}
}
return 1;
}
Kick(i);