Garry's Mod

Garry's Mod

91 ratings
SCP - 682 SWEP
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
100.431 KB
9 May, 2017 @ 10:32am
11 May, 2017 @ 9:57am
3 Change Notes ( view )

Subscribe to download
SCP - 682 SWEP

Description
Description
63 Comments
Wekyc  [author] 7 Feb @ 11:53am 
i have no idea tbh, it could be releated to legacy code and some garrys updates
Alex 7 Feb @ 11:43am 
[ERROR] lua/weapons/scp-682.lua:94: attempt to compare number with nil
1. unknown - lua/weapons/scp-682.lua:94
Wekyc  [author] 7 Feb @ 11:38am 
im kinda clueless
Wekyc  [author] 7 Feb @ 11:37am 
hmm i think that SWEP has to be somehow initialized but i don't remember how

this is rest of my code https://pastebin.com/HpF3h5ck

thh i have no idea wthat could be a problem
Alex 7 Feb @ 11:21am 
all my code ?
Wekyc  [author] 7 Feb @ 11:18am 
ye, but entire weapon code
Wekyc  [author] 7 Feb @ 11:15am 
could you show me an entire code?
Alex 7 Feb @ 10:51am 
[ERROR] lua/weapons/scp-682.lua:94: attempt to index global 'SWEP' (a nil value)
1. unknown - lua/weapons/scp-682.lua:94
Wekyc  [author] 7 Feb @ 10:44am 
https://pastebin.com/wjVDEVQR pasetbin for better format
Wekyc  [author] 7 Feb @ 10:43am 
SWEP.NextAttackW = 30
SWEP.AttackDelay2 = 45
function SWEP:SecondaryAttack()
if self.NextAttackW > CurTime() then
if SERVER then
self.Owner:PrintMessage(3, "Ability 'burst' is still on cooldown!")
return
end
end
self.NextAttackW = CurTime() + self.AttackDelay2
local ply = self.Owner

ply:SetWalkSpeed(300)
ply:SetRunSpeed(300)
ply:SetMaxSpeed(300)
ply:SetJumpPower(300)
local function RemoveBuff()
ply:SetWalkSpeed(115)
ply:SetRunSpeed(115)
ply:SetMaxSpeed(115)
ply:SetJumpPower(200)
end
timer.Create("SCP_PLAYER_WILL_LOSE_BUFF", 5, 1, RemoveBuff)
end

This should work