20.07.2009, 01:49
I'm guessing that doesn't happen all the time? Oh well, I may be wrong, but here's a possible solution:
-- untested
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);
}
}