mirror of
https://github.com/WillMartin03/ulx-custom-commands.git
synced 2025-03-04 03:03:14 -05:00
Bug fix
This commit is contained in:
parent
9e804dadf6
commit
00cf856b8d
@ -64,7 +64,7 @@ function injectPointshop1Module()
|
||||
givepoints:defaultAccess(ULib.ACCESS_SUPERADMIN)
|
||||
end
|
||||
|
||||
timer.Simple(3, function (MadeByZero)
|
||||
timer.Simple(3, function ()
|
||||
if (istable(PS)) then
|
||||
print("[ULXCC]: Pointshop is installed! Adding pointshop module!")
|
||||
injectPointshop1Module()
|
||||
|
@ -78,8 +78,14 @@ if (CLIENT) then
|
||||
concommand.Add("thirdperson_toggle", function ()
|
||||
enabled = !enabled
|
||||
if (enabled) then
|
||||
if (IsValid(ply:GetActiveWeapon())) then
|
||||
ply:GetActiveWeapon().AccurateCrosshair = true
|
||||
end
|
||||
chat.AddText(Color(162, 255, 162), "Third-person mode enabled.")
|
||||
else
|
||||
if (IsValid(LocalPlayer():GetActiveWeapon())) then
|
||||
LocalPlayer():GetActiveWeapon().AccurateCrosshair = false
|
||||
end
|
||||
chat.AddText(Color(255, 162, 162), "Third-person mode disabled.")
|
||||
end
|
||||
end)
|
||||
@ -88,11 +94,8 @@ if (CLIENT) then
|
||||
return true
|
||||
end
|
||||
end)
|
||||
hook.Add("CalcView", "ThirdPersonView", function (ply, pos, ang, fov, madeByZero)
|
||||
hook.Add("CalcView", "ThirdPersonView", function (ply, pos, ang, fov)
|
||||
if (enabled && IsValid(ply) && ply:Alive()) then
|
||||
if (IsValid(ply:GetActiveWeapon())) then
|
||||
ply:GetActiveWeapon().AccurateCrosshair = true
|
||||
end
|
||||
local view = {}
|
||||
view.origin = (pos - (ang:Forward() * 70) + (ang:Right() * 20) + (ang:Up() * 5))
|
||||
view.ang = (ply:EyeAngles() + Angle(1, 1, 0))
|
||||
|
Loading…
Reference in New Issue
Block a user