Hm, ich konnte mich nicht entscheiden, da ich dachte das es eventuell am Addon format liegen könnte.
ok hier die init.lua:
PHP-Code:
AddCSLuaFile ("cl_init.lua")
AddCSLuaFile ("shared.lua")
include ("shared.lua")
SWEP.Weight = 5
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
cl_init.lua:
PHP-Code:
include('shared.lua')
SWEP.PrintName = "TS Gyurza"
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
shared.lua:
PHP-Code:
// Show debug info?
local debug = true
//----------------------------------------------
//Author Info
//----------------------------------------------
SWEP.Author = "--- Loadup[GER] ---"
SWEP.Contact = "--- [email protected] ---"
SWEP.Purpose = "--- It's just a realistic-test-SWEP ---"
SWEP.Instructions = "--- just shoot man. ---"
//----------------------------------------------
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
// First person Model
SWEP.ViewModel = "models/weapons/v_Gyurza.mdl"
// Third Person Model
SWEP.WorldModel = "models/weapons/w_Gyurza.mdl"
// Weapon Details
SWEP.Primary.Clipsize = 210
SWEP.Primary.DefaultClip = 31
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "pistol"
SWEP.Secondary.Clipsize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.Category = "Favorite SWEP's"
// Sound
SWEP.Sound = Sound ("weapon_357.Single")
SWEP.Damage = 50
SWEP.Spread = 0.02
SWEP.NumBul = 1
SWEP.Force = 3
//--------------------------------------------
// Called when it reloads
//--------------------------------------------
function SWEP:Reload()
if debug then
print("Reload")
// Shove your debugging code in here
end
self.Weapon:DefaultReload( ACT_VM_RELOAD ) //animation for reloading
end
//--------------------------------------------
// Called each frame when the Swep is active
//--------------------------------------------
function SWEP:Think()
end
//--------------------------------------------
// Called when the player Shoots
//--------------------------------------------
function SWEP:PrimaryAttack()
if debug then
print("Primary Attack")
// Put Your debugging Code in here
end
// Any Code you want to be executed when the player uses primary attack goes in here
self.Weapon:EmitSound(ShootSound)
end
//--------------------------------------------
// Called when the player Uses secondary attack
//--------------------------------------------
function SWEP:SecondaryAttack()
if debug then
print("Secondary Attack")
// Put your debugging code in here
end
// Any Code you want to my executed when the player uses secondary attack goes in here
self.Weapon:EmitSound(ShootSound)
end