24.03.2010, 01:44
The problem is that with this code it shows up like this:
So if I add break; at the end it comes like this:
No name and no kick. The above posted one (top first quote) does do its job but it has duplicate strings.
No idea what to do any help?
Quote:
KICKED: has been kicked. (Reason: Failed RCON Login) KICKED: [SU]BP13 has been kicked. (Reason: Failed RCON Login) |
Quote:
KICKED: has been kicked. (Reason: Failed RCON Login) |
No idea what to do any help?
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
new pName2[MAX_PLAYER_NAME];
if(!success) //If the password was incorrect
{
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 failed the login
{
new string [128];
GetPlayerName(i, pName2, sizeof(pName2));
format(string, sizeof(string), "KICKED: %s has been kicked. (Reason: Failed RCON Login)", pName2);
SendClientMessageToAll(COLOR_RED, string);
Kick(i);
}
}
}
return 1;
}