08.04.2010, 19:15
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
#if defined LOG_ADMINS
new logstring[64];
new IP[17];
format(IP, sizeof(IP), ip);
if(success)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
new plrip[17];
GetPlayerIp(i, plrip, sizeof(plrip));
if(!strcmp(IP, plrip, false, 17))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(logstring, sizeof(logstring), "RCON: Player %s(ID %d, IP: %s) logged in.", name, i, IP);
}
else format(logstring, sizeof(logstring), "RCON: IP %s logged in.", IP);
}
WriteToLogFile(logstring);
}
if(!success)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
new plrip[17];
GetPlayerIp(i, plrip, sizeof(plrip));
if(!strcmp(IP, plrip, false, 17))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(logstring, sizeof(logstring), "RCON: Player %s(ID %d, IP: %s) tried to login as RCON, but failed.", name, i, IP);
}
else format(logstring, sizeof(logstring), "RCON: IP %s tried to login as RCON, but failed.", IP);
}
WriteToLogFile(logstring);
}
#endif
return 1;
}
Why does it start at 499? o.0