11CreateThread (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
2932end )
33+
3034RegisterNetEvent (' moonshine:brewAlcohol' )
3135AddEventHandler (' moonshine:brewAlcohol' , function ()
3236 Citizen .CreateThread (function ()
0 commit comments