17.06.2013, 09:21
Hi,
Why this callback don't have playerid?
Why this callback don't have playerid?
public OnRconLoginAttempt(ip[], password[], success) { new id = -1, ip2[16]; printf("IP of player who did the login is %s", ip); for (new i = 0; i < GetMaxPlayers(); i++) { GetPlayerIp(i, ip2, 16); if (!strcmp(ip, ip2, true)) { id = i; break; } } if (id == -1) { printf("Someone tried to log in as RCON and I couldn't get their name. IP is %s.", ip); } else { printf("Player ID %i logged in as RCON!", id); } return 1; }