Get The name of the player who Rcon login Attempt OnRconLoginAttempt - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Get The name of the player who Rcon login Attempt OnRconLoginAttempt (
/showthread.php?tid=526550)
Get The name of the player who Rcon login Attempt OnRconLoginAttempt -
GeekSiMo - 18.07.2014
How To get the name or the id of the player who rcon login attempt

OnRconLoginAttempt(ip[], password[], success)
Re: Get The name of the player who Rcon login Attempt OnRconLoginAttempt -
Aerotactics - 18.07.2014
Something like:
new tempip[16];
foreach...
if(GetPlayerIp(i, tempip, sizeof(tempip)) = ip)
...
Re: Get The name of the player who Rcon login Attempt OnRconLoginAttempt -
Miguel - 18.07.2014
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".
}
}
Re: Get The name of the player who Rcon login Attempt OnRconLoginAttempt -
GeekSiMo - 18.07.2014
Thanks !!!