Get The name of the player who Rcon login Attempt OnRconLoginAttempt
#3

You will have to find what player is using the IP from the callback. Loop through all the players, retrieve their IPs and compare them (using strcmp) to the IP of the rcon callback, if anyone matches, retrieve whatever you want from them.

pawn Код:
for (new i = 0; i < MAX_PLAYERS; ++i)
{
    new player_ip[16];

    GetPlayerIp(i, player_ip, sizeof(player_ip));
    if (!strcmp(player_ip, ip, true)) // "ip" is coming from the callback.
    {
        // A player has been found and their ID is now stored in "i".
    }
}
Reply


Messages In This Thread
Get The name of the player who Rcon login Attempt OnRconLoginAttempt - by GeekSiMo - 18.07.2014, 03:47
Re: Get The name of the player who Rcon login Attempt OnRconLoginAttempt - by Aerotactics - 18.07.2014, 04:10
Re: Get The name of the player who Rcon login Attempt OnRconLoginAttempt - by Miguel - 18.07.2014, 13:34
Re: Get The name of the player who Rcon login Attempt OnRconLoginAttempt - by GeekSiMo - 18.07.2014, 14:10

Forum Jump:


Users browsing this thread: 1 Guest(s)