Skipping past that we get to the real meat and bones of a SWEP, the file known as a: There is nothing wrong with any of this code so leave it alone unless you have some kind of fetish for flooding your console with errors. ^ the above code sets the weapon's icon in the q menu and weapon selection menu, you will need knowledge of how to create. SWEP.WepSelectIcon = surface.GetTextureID("weapons/weapon_mad_deagle") If (file.Exists("./materials/weapons/weapon_mad_deagle.vmt", "GAME")) then Override this in your SWEP to set the icon in the weapon selection SWEP.SlotPos = 1 - Governs how far down the slot it will appear, higher numbers will place the weapon towards the bottom (its generally accepted practice give the more powerful weapons higher numbers) SWEP.Slot = 1 - What slot the weapon occupies in the weapon selection menu (for reference slot 0 is physgun, gravgun and crowbar slot) SWEP.PrintName = ".50 DESERT EAGLE" - This is what the weapon will show up as in your Q menu An example entity name is weapon_mad_aidslauncher.Įach weapon consists of 3 lua files, named cl_a, a and a Note that the entity name is NOT the actual weapon name that will appear in the Q menu, this will be defined later. Entity names are what your weapon will appear as in the code and in the in game console, they cannot contain spaces or glitches will happen. gma file to access its lua code) and call it the ENTITY name of your weapon. We are using the mad cows weapon base as an example though most weapon bases look very similar to this so it's not to hard to change bases.įirst things first, open the addons lua/weapons section and copy and paste an existing weapon folder (this assumes you know how to extract an addon from its. First of all i will do a raw copy paste of the weapon's code and show you what each function does and how to change them around to get the desired effect.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |