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

How To get the name or the id of the player who rcon login attempt
OnRconLoginAttempt(ip[], password[], success)
Reply
#2

Something like:

new tempip[16];
foreach...
if(GetPlayerIp(i, tempip, sizeof(tempip)) = ip)
...
Reply
#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
#4

Thanks !!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)