05.07.2009, 07:29
I use the code in we LSTD mode.
Here Kowalski's code:
Here Kowalski's code:
pawn Код:
new HighestID;
public OnPlayerConnect(playerid)
{
if(HighestID < playerid) HighestID = playerid;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(HighestID == playerid)
{
for(new i = playerid-1; i >= 0; i--)
{
if(IsPlayerConnected(i))
{
HighestID = i;
break;
}
}
}
return 1;
}