Garry's Mod

Garry's Mod

91 hodnocení
SCP - 682 SWEP
   
Ocenit
Přidat do oblíbených
Oblíbeno
Odebrat z oblíbených
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun, Roleplay
Velikost souboru
Přidáno
Aktualizováno
100.431 KB
9. kvě. 2017 v 10.32
11. kvě. 2017 v 9.57
Poznámky ke změnám (3) – zobrazit

Klikněte na „Odebírat“ pro stažení položky
SCP - 682 SWEP

Popis
Description
Počet komentářů: 63
Wekyc  [autor] 7. úno. v 11.53 
i have no idea tbh, it could be releated to legacy code and some garrys updates
Alex 7. úno. v 11.43 
[ERROR] lua/weapons/scp-682.lua:94: attempt to compare number with nil
1. unknown - lua/weapons/scp-682.lua:94
Wekyc  [autor] 7. úno. v 11.38 
im kinda clueless
Wekyc  [autor] 7. úno. v 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. úno. v 11.21 
all my code ?
Wekyc  [autor] 7. úno. v 11.18 
ye, but entire weapon code
Wekyc  [autor] 7. úno. v 11.15 
could you show me an entire code?
Alex 7. úno. v 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  [autor] 7. úno. v 10.44 
https://pastebin.com/wjVDEVQR pasetbin for better format
Wekyc  [autor] 7. úno. v 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