User ip adress
#5

I'm guessing that doesn't happen all the time? Oh well, I may be wrong, but here's a possible solution:
pawn Код:
//top of script
new PlayerIP[MAX_PLAYERS];

//OnPlayerConnect
ip[16];
PlayerIP[playerid] = GetPlayerIp(playerid, ip, sizeof ip);

//OnPlayerDisconnect
new str[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
for(new i = 0; i<MAX_PLAYERS; i++)
{
  if(IsPlayerAdmin(i))
  {
   format(str, sizeof str, "%s has left the server! (IP: %d)", name, PlayerIP[playerid]);
   SendClientMessage(i, color, str);
  }
}
-- untested
Reply


Messages In This Thread
User ip adress - by lilstuh - 20.07.2009, 00:34
Re: User ip adress - by saiberfun - 20.07.2009, 01:28
Re: User ip adress - by Grim_ - 20.07.2009, 01:44
Re: User ip adress - by Correlli - 20.07.2009, 01:44
Re: User ip adress - by Grim_ - 20.07.2009, 01:49
Re: User ip adress - by Correlli - 20.07.2009, 01:55
Re: User ip adress - by lilstuh - 20.07.2009, 03:49
Re: User ip adress - by XPlatform - 20.07.2009, 04:19
Re: User ip adress - by Grim_ - 20.07.2009, 05:08
Re: User ip adress - by lilstuh - 20.07.2009, 06:24

Forum Jump:


Users browsing this thread: 3 Guest(s)