Hi,
i have problem with respawning players, when plugin respawn them on death, players are not alive, but camera is bugged, like they are alive and they can see their HP bar, ammo, but they dont have knife or any gun.
How it looks:
https://ctrlv.cz/shots/2019/01/02/VzRB.png
Code:
PHP Code:
public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
int victim = GetClientOfUserId(event.GetInt("userid"));
if(IsValidClient(victim))
{
if(Zone_CheckIfZoneExists("teleport"))
{
float Position[3];
if(Zone_GetZonePosition("teleport", false, Position))
{
CS_RespawnPlayer(victim);
TeleportEntity(victim, Position, NULL_VECTOR, NULL_VECTOR);
CS_RespawnPlayer(victim);
}
else
{
PrintToChatAll("pozice nenalezena");
}
}
else
{
PrintToChatAll("zona nenalezena");
}
}
}
Thanks for help.
__________________