Garry's Mod

Garry's Mod

91 betyg
SCP - 682 SWEP
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun, Roleplay
Filstorlek
Lades upp
Uppdaterades
100.431 KB
9 maj, 2017 @ 10:32
11 maj, 2017 @ 9:57
3 ändringsnotiser ( visa )

Abonnera för att ladda ner
SCP - 682 SWEP

Beskrivning
Description
63 kommentarer
Wekyc  [skapare] 7 feb @ 11:53 
i have no idea tbh, it could be releated to legacy code and some garrys updates
Alex 7 feb @ 11:43 
[ERROR] lua/weapons/scp-682.lua:94: attempt to compare number with nil
1. unknown - lua/weapons/scp-682.lua:94
Wekyc  [skapare] 7 feb @ 11:38 
im kinda clueless
Wekyc  [skapare] 7 feb @ 11:37 
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:21 
all my code ?
Wekyc  [skapare] 7 feb @ 11:18 
ye, but entire weapon code
Wekyc  [skapare] 7 feb @ 11:15 
could you show me an entire code?
Alex 7 feb @ 10:51 
[ERROR] lua/weapons/scp-682.lua:94: attempt to index global 'SWEP' (a nil value)
1. unknown - lua/weapons/scp-682.lua:94
Wekyc  [skapare] 7 feb @ 10:44 
https://pastebin.com/wjVDEVQR pasetbin for better format
Wekyc  [skapare] 7 feb @ 10:43 
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