How to create other weapons using the Lightsaber Addon
3 replies, posted
[B]Need to create weapons that show up in the f4 menu using the lightsaber addon that are set to certain colours and lengths and cant be changed. Ive seen it done on other servers and cant figure it out on my own. Help![/B]
The Lightsaber Addon Im reffering to is the one by Robotboy655
You can edit the weapons' code to hardcode a colour and length. If you don't want to unpack the addon, you can create a weapon inherited off the lightsaber and override methods that allow for changing colours and lengths. You can do that by putting something like this in lua/weapons:
[code]SWEP.Base = "rb_lightsaber_or_whatever_the_name_is"
SWEP.PrintName = "Non-Editable Lightsaber"
-- Override methods here[/code]
[QUOTE=code_gs;51719634]You can edit the weapons' code to hardcode a colour and length. If you don't want to unpack the addon, you can create a weapon inherited off the lightsaber and override methods that allow for changing colours and lengths. You can do that by putting something like this in lua/weapons:
[code]SWEP.Base = "rb_lightsaber_or_whatever_the_name_is"
SWEP.PrintName = "Non-Editable Lightsaber"
-- Override methods here[/code][/QUOTE]
Thanks but what codes woud I put under the Override Methods?
You'll need to read the lightsaber source code to see what you need to change to hardcode colours and length.
Sorry, you need to Log In to post a reply to this thread.