Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PlyStoreWeapons(ply)
- hook.Add("canChangeJob", "dontchangejobIfstored", function(plyr)
- if plyr == ply then return false end
- end)
- ply.storeweps = {}
- for k,v in pairs(ply:GetWeapons()) do
- table.insert(ply.storeweps, {cl = v:GetClass(), c1 = v:Clip1(), c2 = v:Clip2()})
- -- print( v:GetClass() )
- end
- end
- function PlyRetrieveWeapons(ply)
- hook.Remove("canChangeJob", "dontchangejobIfstored")
- for k,v in pairs(ply.storeweps or {}) do
- -- print( v.cl )
- ply:Give(v.cl)
- local wep = ply:GetWeapon(v.cl)
- if IsValid(wep) then
- wep:SetClip1(v.c1)
- wep:SetClip2(v.c2)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement