Hi, I'm learning LUA Scripting, so I decided to start with Sweps. I'm making them using a blanked out Deagle as a starting point, and was just wondering some things.
How can I make it, like in Mad Cows Weapons, where you could lower your weapon and not be able to fire?
Even better: Can I apply that so that your weapon is Always lowered, unless you go into Iron Sights?
Basically, I'm asking if and how I can make it that you cant fire without Ironsights.
(I'm making a bunch of sweps using CSS and HL2 Models, for my GCombat Server (I think I roughly know how to make them do GCombat Damage)
This should at least get you started with the various animations.. (lowering, firing, etc)
[b][url=wiki.garrysmod.com/?title=Weapon.SendWeaponAnim]Weapon.SendWeaponAnim [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
Various activities are available. You can use lua to not allow firing within primary and secondary attack if not in ironsight, etc.
The majority of ironsights and running animations like that are done with [b][url=wiki.garrysmod.com/?title=SWEP.GetViewModelPosition]SWEP.GetViewModelPosition [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. I would take a look at the cl_init.lua of Mad Cow's base in that hook for some guidance.
Thanks Guys. I'll take a look at Weapon.SendWeaponAim on the Wiki and also check out Mad Cow's base this morning (Im on at 5 am for some bizzarre (Spelling?) reason.)
Sorry, you need to Log In to post a reply to this thread.