CS_RespawnPlayer CSGO become ghost.
So I'm having an interesting timing issue with CS:GO and CS_RespawnPlayer.
I am hooking the "player_death" event in order to respawn players immediately after they die. However, if I run the RespawnPlayer command from the death event hook, the player respawns but are in the floor and are sort of a ghost player (not alive, no weapons but can move around kind of). However I can get around this by using CreateTimer and any amount of time works. For instance I can use a 0.000001 timer and it will respawn immediately and works wonderfully. Is there something I am doing wrong? I am already using PostHook. |
Re: CS_RespawnPlayer CSGO become ghost.
Sounds like a problem with the players team. Try to check that they are set to a valid team.
But why don't you just use mp_respawn_on_death_ct 1;mp_respawn_on_death_t 1 ? |
Re: CS_RespawnPlayer CSGO become ghost.
I eventually wont be using it for an instant respawn system, just wanted to find out what the requirements were for a valid spawn.
I guess, Valid Team and Is Dead? |
Re: CS_RespawnPlayer CSGO become ghost.
Show your code in pm or here.
|
Re: CS_RespawnPlayer CSGO become ghost.
Works Fine
Code:
public OnPluginStart() { Code:
public OnPluginStart() { |
Re: CS_RespawnPlayer CSGO become ghost.
Quote:
Try to use ChangeClientTeam(client, team) before respawning the player. 1 = Spectate 2 = Terrorists 3 = Counter-Terrorists |
Re: CS_RespawnPlayer CSGO become ghost.
Quote:
Create the timer outside the event(maybe on plugin start or map start). I think i got more reason but no way to explain it sorry so when i back i will fix it.. |
Re: CS_RespawnPlayer CSGO become ghost.
Quote:
Code:
public Action Event_PlayerDeath(Handle event, const char[] name, bool dontBroadcast) |
Re: CS_RespawnPlayer CSGO become ghost.
some things just need a delay
|
Re: CS_RespawnPlayer CSGO become ghost.
Quote:
|
All times are GMT -4. The time now is 20:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.