28.05.2011, 15:58
Hi.
First, when someone disconnects it always says 255.255.255.255
And the second , how to show several Ids in 1 line
like lets say I do somekind of a list it will always show like this
"Namehere(idhere)"
and then make a line right under but I would like to do it like this
"namehere(idhere), "namehere2(idhere2)"
and then at the last there will be no comma?
First, when someone disconnects it always says 255.255.255.255
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new IP[16], string[128];
GetPlayerIp(playerid, IP, sizeof(IP));
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i))
{
switch(reason)
{
case 0: format(string, sizeof(string), "%s. IP: %s. has left the server (Timed out)", PlayerName(playerid), IP);
case 1: format(string, sizeof(string), "%s. IP: %s. has left the server (Quit)", PlayerName(playerid), IP);
case 2: format(string, sizeof(string), "%s. IP: %s. has left the server (Kicked)", PlayerName(playerid), IP);
}
SendClientMessage(i, Grey, string);
}
}
return 1;
}
like lets say I do somekind of a list it will always show like this
"Namehere(idhere)"
and then make a line right under but I would like to do it like this
"namehere(idhere), "namehere2(idhere2)"
and then at the last there will be no comma?