Need something to be ran when SWEP is no longer in use.
3 replies, posted
In the SWEP:Initialize function, I made a hook that MUST be removed when the SWEP is no longer in use, is there something like a SWEP:PutAway function, or some other thing I don't know?
SWEP.Holster; but beware that this is only ran serverside in singleplayer. Make sure you also paste the same thing in the SWEP.OnRemove function, and you check if the weapon is active in there.
[QUOTE=code_gs;50717764]SWEP.Holster; but beware that this is only ran serverside in singleplayer. Make sure you also paste the same thing in the SWEP.OnRemove function, and you check if the weapon is active in there.[/QUOTE]
One question though- if I add a hook in SWEP.Initialize, will it be completely removed if you put hook.Remove() in those two functions?
[QUOTE=Lavacoal123;50718061]One question though- if I add a hook in SWEP.Initialize, will it be completely removed if you put hook.Remove() in those two functions?[/QUOTE]
Yes.
Sorry, you need to Log In to post a reply to this thread.