Skip to content

Commit 2a2c09f

Browse files
authored
Update main.lua
1 parent c148ed5 commit 2a2c09f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client/main.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
CreateThread(function()
22
while true do
3+
local wa = 3000
34
local x, y, z = table.unpack(GetEntityCoords(PlayerPedId()))
45
local isNearStill = DoesObjectOfTypeExistAtCoords(x, y, z, 1.5, joaat(Config.brewProp), true)
56
local isNearBarrel = DoesObjectOfTypeExistAtCoords(x, y, z, 1.5, joaat(Config.mashProp), true)
67
local stillEntity = GetClosestObjectOfType(x, y, z, 1.5, joaat(Config.brewProp), false, false, false)
78
local damageHealth = GetObjectFragmentDamageHealth(stillEntity, true)
89

9-
Citizen.Wait(3)
1010
if isNearStill and damageHealth > 0.38533836603165 then
11+
wa = 3
1112
DrawTxt(Config.Translation.createAlcohol, 0.50, 0.75, 1.9, 0.5, true, 255, 255, 255, 255, true)
1213
if IsControlJustReleased(0, 0xCEFD9220) then
1314
TriggerEvent('moonshine:brewAlcohol')
@@ -19,14 +20,17 @@ CreateThread(function()
1920

2021
end
2122
elseif isNearBarrel then
23+
wa = 3
2224
DrawTxt(Config.Translation.createMash, 0.50, 0.95, 0.7, 0.5, true, 255, 255, 255, 255, true)
2325
if IsControlJustReleased(0, 0x760A9C6F) then
2426
print("Mash: Debug")
2527
TriggerEvent('moonshine:createMash')
2628
end
2729
end
30+
Citizen.Wait(wa)
2831
end
2932
end)
33+
3034
RegisterNetEvent('moonshine:brewAlcohol')
3135
AddEventHandler('moonshine:brewAlcohol', function()
3236
Citizen.CreateThread(function()

0 commit comments

Comments
 (0)