javaferro.blogg.se

Great addons for gmod
Great addons for gmod




great addons for gmod
  1. #Great addons for gmod code
  2. #Great addons for gmod download

Note: We will be using the single file ( a) layout for this tutorial.Īt the top of the a file, you can enter all of the information that will define a SWep's name, category, and certain behaviours, amongst other things. Language.Add ( "Undone_Thrown_SWEP_Entity", "Undone Thrown SWEP Entity" ) end

great addons for gmod

How it works: //When you create an undo, you specify the ID: // undo.Create("Some_Identity") //By creating an associated language, we can make the undo notification look better: // language.Add("Undone_Some_Identity", "Some message.") SWEP.DrawCrosshair = false //Ensures a clean looking notification when a chair is undone. SWEP.DrawAmmo = false //Sets the drawing of the crosshair when this weapon is deployed SWEP.SlotPos = 1 //Sets drawing the ammuntion levels for this weapon SWEP.PrintName = "Chair throwing gun" //Sets the position of the weapon in the switching menu //(appears when you use the scroll wheel or keys 1-6 by default) SWEP.AutoSwitchFrom = false elseif CLIENT then // This is where the cl_a stuff goes //The name of the SWep, as appears in the weapons tab in the spawn menu(Q Menu) SWEP.Weight = 5 //Allow automatic switching to/from this weapon when weapons are picked up

#Great addons for gmod download

This makes sure clients download the fileĪddCSLuaFile ( "a" ) //How heavy the SWep is

great addons for gmod

If SERVER then // This is where the a stuff goes. You can also use the else/elseif statement instead of two if statements, to tidy up the code. Now, create a new directory with a simple name (without spaces) for your SWep. The default location of the steam folder is C:\Program Files\Steam, or C:\Program Files (x86)\Steam for 64-bit operating systems. Go to the directory (folder): /steamapps//garrysmod/garrysmod/lua.

#Great addons for gmod code

In this tutorial, we will be making a SWep with the RPG Launcher model to fire chairs.įirst of all, it is suggested you download a good code editor such as Notepad++, with a GMod Lua syntax highlighter like this one. Popular choices for SWeps include launching objects, such as watermelons or chairs, and 'better' versions of existing weapons, like a crossbow that can shoot several bolts per second. Better known as a SWep (or SWEP in some cases) a scripted weapon is a weapon that has an underlying script controlling its operation.






Great addons for gmod