Skip to content

Commit

Permalink
Update client.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
TerbSEC authored Apr 19, 2020
1 parent fd31948 commit 92ad2de
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CreateThread(function()
local ply = PlayerPedId()
local objectCoords = oElement.fObjectCoords
local distanceDiff = #(objectCoords - plyCoords)
if (distanceDiff < 2.0 and not inUse) then
if (distanceDiff < 2.0 and not InUse) then
if (oElement.fObjectIsBed == true) then

-- // ARROW RIGHT
Expand Down Expand Up @@ -62,10 +62,10 @@ CreateThread(function()
end
end

if (inUse) then
if (InUse) then
DrawText3Ds(objectCoords.x, objectCoords.y, objectCoords.z, Config.Text.Standup)
if IsControlJustPressed(0, Config.objects.ButtonToStandUp) then
inUse = false
InUse = false
TriggerServerEvent('ChairBedSystem:Server:Leave', oElement.fObjectCoords)
ClearPedTasksImmediately(ply)
FreezeEntityPosition(ply, false)
Expand Down Expand Up @@ -125,7 +125,7 @@ end)
CreateThread(function()
while Config.Healing ~= 0 do
Wait(Config.Healing * 1000)
if inUse == true then
if InUse == true then
if oElement.fObjectIsBed == true then
local ply = PlayerPedId()
local health = GetEntityHealth(ply)
Expand All @@ -151,7 +151,7 @@ AddEventHandler('ChairBedSystem:Client:Animation', function(v, coords)
PlyLastPos = GetEntityCoords(ped)
FreezeEntityPosition(object, true)
FreezeEntityPosition(ped, true)
inUse = true
InUse = true
if isBed == false then
if Config.objects.SitAnimation.dict ~= nil then
SetEntityCoords(ped, objectcoords.x, objectcoords.y, objectcoords.z + 0.5)
Expand Down Expand Up @@ -228,4 +228,4 @@ function Animation(dict, anim, ped)
end

TaskPlayAnim(ped, dict, anim, 8.0, 1.0, -1, 1, 0, 0, 0, 0)
end
end

0 comments on commit 92ad2de

Please sign in to comment.