View Single Post
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 04-07-2010 , 19:03   Re: Knife DeathMatch
Reply With Quote #5

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_originidorigin )
    origin[2] -= 500
    set_user_origin
    idorigin )

    // weapon shit

    origin[2] += 500
    set_user_origin
    idorigin )

    // 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?
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT

Last edited by wrecked_; 04-07-2010 at 19:16.
wrecked_ is offline