23.05.2011, 10:42
bump, also another question
The code works perfectly fine, but it still shows the old messages? Like SERVER: Bad RCON Login. Repeated times ....., and when you logged in "SERVER: You have logged in as an admin"
I want that away, I want my own messages how to ?
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!success)
{
new IP[16], string[128], pName[MAX_PLAYER_NAME];
GetPlayerIp(i, IP, sizeof(IP));
GetPlayerName(i, pName, sizeof(pName));
RCONAttempts(pName, ip, password);
if(!strcmp(ip, IP, true))
{
LoginAttempt[i]++;
if(LoginAttempt[i] == 1) return SendClientMessage(i, AdminColor, "Wrong RCON login. 2 attempts left");
if(LoginAttempt[i] == 2) return SendClientMessage(i, AdminColor, "Wrong RCON login. 1 attempts left");
if(LoginAttempt[i] == 3)
{
SendClientMessage(i, AdminColor, "banned .. ");
LoginAttempt[i] = 0;
Ban(i);
}
}
}
else
{
SendClientMessage(i, AdminColor, "logged in");
}
}
return 1;
}
I want that away, I want my own messages how to ?