• Creating your own hooks
    2 replies, posted
Hi I'm wondering how I would go about adding my own hooks so for example if I have a function called ChangeTeam( ply, team ) I would like to be able to do hook.Add( "ChangeTeam", "notify team members", function() blah blah end )
hook.Call
ninja'd Inside your ChangeTeam(ply, team) function add a line somewhat like: [code]hook.Call("ChangeTeam", GAMEMODE, ply, team)[/code] And then you can use like [code]hook.Add("ChangeTeam", "PlayerChangedTeam", function(ply, team) /* do stuff */ end)[/code]
Sorry, you need to Log In to post a reply to this thread.