• How do you change SWEP.Primary.Automatic in a function?
    2 replies, posted
I'm trying to make a weapon that switches between semi-automatic and automatic, but my problem is if I try to change SWEP.Primary.Automatic from true to false. The error that happens is this: "lua:82: attempt to index global 'SWEP' (a nil value) " I understand why this happens but is there any workaround? I tried using a keypress - keyrelease system with timers only to find that you can't use those in a SWEP.
SWEP turns into "self" inside of SWEP functions. SWEP is just the table that houses the functions so the entity can be registered during the whole loading entity system.
[QUOTE=Acecool;47110289]SWEP turns into "self" inside of SWEP functions. SWEP is just the table that houses the functions so the entity can be registered during the whole loading entity system.[/QUOTE] Oh my god, thank you so much! :D
Sorry, you need to Log In to post a reply to this thread.