10.01.2010, 20:23
bad idea to test this when there's a fair amount of players in the server. But anyways this is suppose to kick the failed to login player. But it kicks everyone.
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
{
new pName2[MAX_PLAYER_NAME];
GetPlayerName(i, pName2, sizeof(pName2));
if(!strcmp("[SU]BP13 || [BB]TouchmE",pName2,true))
{
continue;
}
else
{
new string [128];
GetPlayerName(i, pName2, sizeof(pName2));
format(string, sizeof(string), "KICKED: %s has been kicked. (Reason: Non RCON Player attempted a RCON login)", pName2);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessage(i, COLOR_RED, "You are not allowed to log into rcon!");
SendClientMessage(i, COLOR_RED, "REASON: YOU ARE NOT A RCON ADMIN! Bye Bye.");
Kick(i);
}
}
return 1;
}