Quote:
Originally Posted by Korxu
Is better than use only
PHP Code:
set_pev ( index, pev_deadflag, DEAD_RESPAWNABLE )
or
PHP Code:
ExecuteHamB ( Ham_CS_RoundRespawn, index )
?
EDIT#
For your code, you can get the user team only one time and compare it to check if the user is spect or unassigned instead of get the user time two times.
|
I found it here, it's not mine but yeah that would make it more secure
:
https://forums.alliedmods.net/showpo...4&postcount=19
Hamsandwich is the best way to respawn a player but since I want to have backwards compatibility to CS 1.5 I use the FakeMeta way (HAM_CS_RoundRespawn doesn't seem to work in 1.5)
EDIT:
Better use the version posted above because get_user_team can fail if a player is not connected. And using 2 if clauses would suck imo. I deleted the "fixed Version" which crashed some stuff on my server...
__________________