• Transfer of information
    3 replies, posted
Hey, So I want to be able to have a variable that is say true by default (this I can do) in a gamemode script. However when a specific item is given by an addon I want to set that value to false in the gamemode script. I believe I need to use a hooks but im not exactly sure how. Any help would be great. Thanks, Red
The only 2 hooks i can think of right now are either GM/PlayerCanPickupItem or GM/HUDItemPickedUp i know that HUDItemPickedUp is used for HUDs (duh) but you can still use it to change variables etc. Thats what i did for addon once for detecting ammo refilling etc.
Would there be any other way if not using hooks to pass the information from the addon to the gamemode?
You can "create" your own hooks by calling hook.Call with your own name and the parameters you wish, and you can also call functions or modify gamemode variables via the GM/GAMEMODE global variable
Sorry, you need to Log In to post a reply to this thread.