Skip to content

Commit

Permalink
Fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeBenit committed Apr 30, 2017
1 parent c00e47a commit 732f9f0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lua/autorun/server/guigui_handcuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ function Handcuff(ent, ply)
if ent:IsValid() and ent:IsPlayer() then
ent:Give("guigui_handcuffed")
ent:SelectWeapon("guigui_handcuffed")
local speed = ent:GetWalkSpeed()/2
ent:SetWalkSpeed(speed)
ent:SetRunSpeed(speed)
local WalkSpeed = ent:GetWalkSpeed()/2
local RunSpeed = ent:GetRunSpeed()/2
ent:SetWalkSpeed(WalkSpeed)
ent:SetRunSpeed(RunSpeed)
ent:ManipulateBoneAngles(ent:LookupBone("ValveBiped.Bip01_L_UpperArm"), Angle(20, 8.8, 0))
ent:ManipulateBoneAngles(ent:LookupBone("ValveBiped.Bip01_L_Forearm"), Angle(15, 0, 0))
ent:ManipulateBoneAngles(ent:LookupBone("ValveBiped.Bip01_L_Hand"), Angle(0, 0, 75))
Expand All @@ -26,9 +27,10 @@ function RemoveHandcuff(ent, ply, lockpick)
local wep = ent:GetActiveWeapon():GetClass()
if wep == "guigui_handcuffed" then
ent:StripWeapon("guigui_handcuffed")
local speed = ent:GetWalkSpeed()*2
ent:SetWalkSpeed(speed)
ent:SetRunSpeed(speed)
local WalkSpeed = ent:GetWalkSpeed()*2
local RunSpeed = ent:GetRunSpeed()*2
ent:SetWalkSpeed(WalkSpeed)
ent:SetRunSpeed(RunSpeed)
ent:ManipulateBoneAngles(ent:LookupBone("ValveBiped.Bip01_L_UpperArm"), Angle(0, 0, 0))
ent:ManipulateBoneAngles(ent:LookupBone("ValveBiped.Bip01_L_Forearm"), Angle(0, 0, 0))
ent:ManipulateBoneAngles(ent:LookupBone("ValveBiped.Bip01_L_Hand"), Angle(0, 0, 0))
Expand Down

0 comments on commit 732f9f0

Please sign in to comment.