View Single Post
eyal282
Veteran Member
Join Date: Aug 2011
Old 11-10-2018 , 14:38   Re: HookEvent PlayerSpawned and RoundStart with commands
Reply With Quote #4

If you wish to exclude player_spawn that is due to stuff like mp_respawn_on_death_t/ct or !revive, you'll have to hook for player_spawn as usual but make another two conditions that the player didn't die this round AND that when he spawned, GetGameTime() < GameRules_GetPropFloat("m_fRoundStartTime") + GetConVarFloat(FindConVar("mp_join_grace_time ") + GetConVarFloat(FindConVar("mp_freezetime")).

IIRC, you can only get the value of freezetime in the beginning of the round and not in the spawn since it's only effective when a round starts. About mp_join_grace_time I really don't know.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 11-10-2018 at 14:42.
eyal282 is offline