dobrograd-13-06-2022/garrysmod/addons/feature-sit/lua/autorun/ugh.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

23 lines
576 B
Lua

if SERVER then
AddCSLuaFile()
return
end
local last = false
local lsit = 0
hook.Remove("Think","Sitting_AltUse")
hook.Add("Think","Sitting_CtrlUse",function()
if IsValid( LocalPlayer() ) and IsValid( LocalPlayer():GetVehicle() ) then
LocalPlayer():GetVehicle():SetThirdPersonMode( false )
end
-- if(last and !input.IsKeyDown(KEY_E)) then
-- if input.IsKeyDown(KEY_LSHIFT) or input.IsKeyDown(KEY_RSHIFT) then
-- if lsit + 1 < CurTime() then
-- RunConsoleCommand("sit")
-- lsit = CurTime()
-- end
-- end
-- end
-- last = input.IsKeyDown(KEY_E)
end)