If the process of respawning the player with a specific action respawns with the following code,
there is a problem that the player can not switch weapons or jump
After investigating the cause, it seems that calling m_iPlayerState with SetEntProp is incorrect.
I found that the solution was to set the PlayerState setting in SDKCall and the player would work fine.
I don't understand SDKCall, so I want this source code to code how to set PlayerState using SDKCall
This action is the only problem, and if you don't know without looking at all the sources, send it privately
PHP Code:
public Action SpawnPlayer(Handle timer, any reviveClient)
{
int client = GetClientUserId(reviveClient);
DispatchSpawn(reviveClient);
SetEntProp(reviveClient, Prop_Send, "m_iPlayerState", 0);
SetEntProp(reviveClient, Prop_Send, "m_iHideHUD", 2050);
TeleportEntity(reviveClient, pPos[client], NULL_VECTOR, NULL_VECTOR);
}