• Hooks on a base?
    3 replies, posted
Is there a way to add a GUIMousePressed hook on a base? If not, is there another alternative?
What base? Gamemode base?
A weapon base... sorry. While Im at it, I cant figure out why I am having trouble getting a table stored on the Owner of the weapon: [code] MySelf = self.Owner local Items = {} table.Add(Items, MySelf.Clips[self.ClipSlot]) [/code] It always tells me "Attempt to index Clips (a nil Value)." Im trying to get the number of entries in Clips subtable which has the structure of: ply.Clips {} ply.Clips.[Index of 1 - 8] {} ply.Clips.(index).[Index of 1 - 4] <--- I need to count this! Im trying to count that index of 1 - 4. It is the number of clips that the player has in his inventory, but I dont really know how to count them with the #. Thats it. Can you help me out with that also?
[QUOTE=SeveredSkull;24056212]Is there a way to add a GUIMousePressed hook on a base? If not, is there another alternative?[/QUOTE] Yes. Just add it like you'd be adding any other hook. [QUOTE=SeveredSkull;24056662]While Im at it, I cant figure out why I am having trouble getting a table stored on the Owner of the weapon: [code] MySelf = self.Owner local Items = {} table.Add(Items, MySelf.Clips[self.ClipSlot]) [/code] It always tells me "Attempt to index Clips (a nil Value)."[/QUOTE] That means that self.Owner.Clips doesn't exist. Where are you creating it?
Sorry, you need to Log In to post a reply to this thread.