Thread: [Solved] Respawn Bug on Course maps
View Single Post
Author Message
Javierko
AlliedModders Donor
Join Date: Sep 2017
Location: Czech republic
Old 01-02-2019 , 10:05   Respawn Bug on Course maps
Reply With Quote #1

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[] namebool dontBroadcast)
{
    
int victim GetClientOfUserId(event.GetInt("userid"));

    if(
IsValidClient(victim))
    {
        if(
Zone_CheckIfZoneExists("teleport"))
        {
            
float Position[3];
            if(
Zone_GetZonePosition("teleport"falsePosition))
            {
                
CS_RespawnPlayer(victim);
                
TeleportEntity(victimPositionNULL_VECTORNULL_VECTOR);
                
CS_RespawnPlayer(victim);
            }
            else
            {
                
PrintToChatAll("pozice nenalezena"); 
            }
        }
        else
        {
            
PrintToChatAll("zona nenalezena");
        }
    }

Thanks for help.
__________________
My Github & Sourcemod work.
If you like my work and if you want to support me, you can through PayPal.

Official SourceMod CZ/SK Discord: https://discord.gg/Qvar55a

Last edited by Javierko; 01-03-2019 at 06:42.
Javierko is offline