if ( SERVER ) then
AddCSLuaFile( "shared.lua" )
SWEP.HoldType = "ar2"
end
if ( CLIENT ) then
SWEP.Author = "I K E A FOR SWEDEN"
SWEP.Contact = "I K E A FOR SWEDEN"
SWEP.Purpose = "kill fags !!!"
SWEP.Instructions = "Left Click to fire"
SWEP.PrintName = "H&K G3"
SWEP.Slot = 2
SWEP.SlotPos = 0
SWEP.IconLetter = "f"
SWEP.ViewModelFlip = true
killicon.AddFont("cse_p228","CSKillIcons",SWEP.IconLetter,Color(255,80,0,255))
end
SWEP.Base = "weapon_cs_base"
SWEP.Category = "I K E A S weapon pack"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.ViewModel = "models/weapons/v_rif_ak48.mdl"
SWEP.WorldModel = "models/weapons/w_rif_ak48.mdl"
SWEP.Weight = 4
SWEP.AutoSwitchTo = true
SWEP.AutoSwitchFrom = true
SWEP.Primary.Sound = Sound( "weapons/HKG3/ak47-1.waw" )
SWEP.Primary.Recoil = 0,1
SWEP.Primary.Damage = 30
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0.01
SWEP.Primary.ClipSize = 30
SWEP.Primary.Delay = 0.3
SWEP.Primary.DefaultClip = 300
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = "ar2"
SWEP.IronSightsPos = Vector(-5.15,-3,2.37)
SWEP.IronSightsAng = Vector(-.4,0,0)
thats the lula script for one of my sweps that dont work
[highlight](User was banned for this post ("Undescriptive thread title / wrong forum / homophobia" - mahalis))[/highlight]
Use Lua tags. What the error?
lula tags ??? and i dont get them in the game and the sonduds wont work on thos that work
Can you type in standard English? I can't read what your saying. Where are you putting the lua file?
add end at the end of your SWEP Script since you put a if ( CLIENT ) at the top
in lula in garrys mod and sorrry for my bad english im swe
[editline]07:11PM[/editline]
what end in tha end just end no infront of end
its lua...
[code]lua\entities\weapons\<Weapon Name>[/code]
Your weapon should be here, titled "shared.lua" Post any lua errors you get.
yes it is lua
sorry didnt see the one at the top
oo im having them in lua\weapons\name
[editline]07:15PM[/editline]
oo thx man
[editline]07:17PM[/editline]
but 3 of them work but not the sound thats wierd
[code]"weapons/HKG3/ak47-1.wav"[/code]
weapons/1928/shared.lua:56: '<eof>' expected near 'end'
weapons/g36c/shared.lua:56: '<eof>' expected near 'end'
weapons/mp7/shared.lua:56: '<eof>' expected near 'end'
weapons/scar/shared.lua:56: '<eof>' expected near 'end'
[editline]07:23PM[/editline]
i get this errors now
[code]killicon.AddFont("cse_p228","CSKillIcons",SWEP.Ico nLetter,Color(255,80,0,255))[/code]
Should be
[code]killicon.AddFont("cse_p228","CSKillIcons",SWEP.IconLetter,Color(255,80,0,255))[/code]
ok but i still get
weapons/1928/shared.lua:56: '<eof>' expected near 'end'
weapons/g36c/shared.lua:56: '<eof>' expected near 'end'
weapons/mp7/shared.lua:56: '<eof>' expected near 'end'
weapons/scar/shared.lua:56: '<eof>' expected near 'end'
[editline]07:50PM[/editline]
its thios u used to work but non of the others that i have got the problem but they dont show up in weapons i gmod
You're missing an end, or (). I can't check it without the base, or a viewable version of the weapon code.
This line [lua]
SWEP.Primary.Recoil = 0,1[/lua] needs to be [lua] SWEP.Primary.Recoil = 0.1[/lua]
[editline]hai[/editline]
This line[lua]
SWEP.IronSightsAng = Vector(-.4,0,0) [/lua]has an error on the first part. -.4 is not a valid number, therefore make it 0.4 or whatever value you want. [lua]SWEP.IronSightsAng = Vector(0.4,0,0) [/lua]
it still dont work
[QUOTE=I K E A FOR SWE;18493418]it still dont work[/QUOTE]
Post an error or we assume you're lazy and want us to do it for you.
weapons/1928/shared.lua:56: '<eof>' expected near 'end'
weapons/g36c/shared.lua:56: '<eof>' expected near 'end'
weapons/mp7/shared.lua:56: '<eof>' expected near 'end'
weapons/scar/shared.lua:56: '<eof>' expected near 'end'
i posted this error 2 times
I cant see any more errors. Have you restarted the map?
yes and the game to but i dint get them in the game
i wonet mind if u pm me a swep code that works i give u cred ofc
[b]<eof> expected near end[/b] means there are TOO MANY [b]end[/b] in the lua. It is expecting the end of the file instead of an [b]end[/b]. Find the unnecessary [b]end[/b] and remove it
kayy thx man if it work or ells i omg gona call u dummbo im trying now hopp ist working
[editline]04:09PM[/editline]
wtf that dint work its just a pisltol on the wrong side wtf plz give me a sweps code i give the athur ccred my wont work for 6 years
Sorry, you need to Log In to post a reply to this thread.