Inefficiencies & problems:
- Indent properly, it's pretty disgusting.
- In knife(), you don't need two variables for the origin. You can use
PHP Code:
new origin[3]
get_user_origin( id, origin )
origin[2] -= 500
set_user_origin( id, origin )
// weapon shit
origin[2] += 500
set_user_origin( id, origin )
// stuff
Your reasoning behind the origin setting is pointless to me, and could cause issues (players get stuck in worldspawn and die, it's happened many times before).
- Declare
PHP Code:
new id = read_data(2)
inside of your cvar_enabled check.
- Do NOT use cs_user_spawn(), it is experimental, buggy, and probably doesn't even work. Use ExecuteHamB( Ham_CS_RoundRespawn, id ) instead.
- You don't need new hit = hitplace in client_death. Just use hitplace...
EDIT: Hasn't this been made before?
__________________