Gmod 10

Zexon
Garrys Mod Fourms
Gmod Links
Gmod Polls
Zexon's Gallery
Downloads & code
Zexon,s Lua Downloads
Zexon

welcome to Zexon A Garry's mod 10 website
=> Not registered yet?

Garrys Mod Fourms - Basic Weapons Code

You are here:
Garrys Mod Fourms => Lua Codes => Basic Weapons Code

<-Back

 1 

Continue->


Zexon
(13 posts so far)
06/17/2007 9:07pm (UTC)[quote]
Below is your basic lua weapons code

copy and paste on to Notebook
and save as Shared.lua
....................................

SWEP.Weight = 5 //how much the gun weighs (don't change)
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false

SWEP.Primary.Sound = Sound( "||set||" ) //what sound the gun is ex.: weapon_deagle.single
SWEP.Primary.Recoil = ||set|| //how much recoil the gun has
SWEP.Primary.Damage = ||set|| //how much damgage the gun does
SWEP.Primary.NumShots = ||set||
SWEP.Primary.Cone = ||set o.|| //shot radius/spread for a shot gun 0.10 is good, for a normal gun try 0.02 or 0.03.. type 0.00 for no spread
SWEP.Primary.ClipSize = 99999 //clip size of course... replace with a # if you want
SWEP.Primary.Delay = ||set|| //how fast the gun fires
SWEP.Primary.DefaultClip = 99999 // ammo left
SWEP.Primary.Automatic = ||set- true, false|| // if it's automatic (true) or not (false)
SWEP.Primary.Ammo = "pistol" // ammo type DO NOT REPLACE UNLESS YOUR MAKING A SHOTGUN then change it to "buckshot"

SWEP.Secondary.ClipSize = -1 // don't change the secondary options unless you know what your doing
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"

Answer:

Nickname:

 Text color:

 Font size:
Close tags



Total topics: 935
Total posts: 972
Total users: 7
Online now (registered users): Nobody crying smiley
Today, there have been 8 visitors (18 hits) on this page!
Zexon

Zexon makes maps and lua

This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free