Sometimes the newly-joined players will spawn under the map. I think happens it makes if the player did not select a team when entering the server.
Unfortunately, there is no source code for
zbm3_addon_autorespawn, but through the lysis can see the following:
Code:
public void:OnClientPostAdminCheck(clientIndex)
{
if (IsFakeClient(clientIndex))
{
return void:0;
}
GetClientAuthId(clientIndex, AuthIdType:1, SteamID[clientIndex], 66, true);
new i;
while (i < 66)
{
if (StrEqual(SteamID[clientIndex], DataSteamID[i], true))
{
return void:0;
}
i++;
}
CreateTimer(10.0, EventAutoRespawn, clientIndex, 2);
return void:0;
}
public Action:EventAutoRespawn(Handle:hTimer, any:clientIndex)
{
if (!IsPlayerExist(clientIndex, false))
{
return Action:4;
}
if (!ZP_GetRoundState(ZPServerRound:1))
{
new CMode = ZP_GetRoundState(ZPServerRound:4);
switch (CMode)
{
case 4, 5:
{
}
default:
{
if (!IsPlayerAlive(clientIndex))
{
ZP_ForceClientRespawn(clientIndex);
}
}
}
}
return Action:4;
}
I think it's better to create a timer
EventAutoRespawn in the event
player_team.
__________________