If the swep doesn't already have a base, set SWEP.Base = "weapon_tttbase"
But it has a SWEP Base ._.
Look for lua errors in your console.
Yeah ive got this Error :
[Code]
[ERROR] gamemodes/terrortown/gamemode/player.lua:600: attempt to call method 'DampenDrop' (a nil value)
1. unknown - gamemodes/terrortown/gamemode/player.lua:600
[/code]
Edit:
And this :
[Code]
[ERROR] gamemodes/terrortown/gamemode/player.lua:600: attempt to call method 'DampenDrop' (a nil value)
1. unknown - gamemodes/terrortown/gamemode/player.lua:600
2. DispatchTraceAttack - [C]:-1
3. DoAttack - lua/weapons/csgo_baseknife.lua:201
4. unknown - lua/weapons/csgo_baseknife.lua:140
[/Code]
Put this somewhere on your weapon script:
[code]
function SWEP:DampenDrop()
local phys = self:GetPhysicsObject()
if IsValid(phys) then
phys:SetVelocityInstantaneous(Vector(0,0,-75) + phys:GetVelocity() * 0.001)
phys:AddAngleVelocity(phys:GetAngleVelocity() * -0.99)
end
end
[/code]
@Stardust342
Thx I think it helps :)
Sorry, you need to Log In to post a reply to this thread.