mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 14:56:02 +01:00
fix ConsumeSuccess and other typos
This commit is contained in:
@@ -527,7 +527,7 @@ end)
|
|||||||
RegisterNetEvent(GetCurrentResourceName()..":server:setNeed", function(type, amount) local src = source
|
RegisterNetEvent(GetCurrentResourceName()..":server:setNeed", function(type, amount) local src = source
|
||||||
if type == "thirst" then
|
if type == "thirst" then
|
||||||
setThirst(src, amount)
|
setThirst(src, amount)
|
||||||
elseif type == "thirst" then
|
elseif type == "hunger" then
|
||||||
setHunger(src, amount)
|
setHunger(src, amount)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -564,8 +564,8 @@ end
|
|||||||
-- [[CONSUME]] --
|
-- [[CONSUME]] --
|
||||||
function ConsumeSuccess(itemName, type)
|
function ConsumeSuccess(itemName, type)
|
||||||
ExecuteCommand("e c")
|
ExecuteCommand("e c")
|
||||||
toggleItem(false, itemName, 1)
|
removeItem(itemName, 1)
|
||||||
if GetResourceState(ESXEport):find("start") then
|
if GetResourceState(ESXExport):find("start") then
|
||||||
if Items[itemName].hunger then
|
if Items[itemName].hunger then
|
||||||
TriggerServerEvent(GetCurrentResourceName()..":server:setNeed", "hunger", Items[itemName].hunger * 10000)
|
TriggerServerEvent(GetCurrentResourceName()..":server:setNeed", "hunger", Items[itemName].hunger * 10000)
|
||||||
end
|
end
|
||||||
@@ -581,9 +581,14 @@ function ConsumeSuccess(itemName, type)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if type == "alcohol" then alcoholCount += 1
|
if type == "alcohol" then alcoholCount += 1
|
||||||
if alcoholCount > 1 and alcoholCount < 4 then TriggerEvent("evidence:client:SetStatus", "alcohol", 200) elseif alcoholCount >= 4 then TriggerEvent("evidence:client:SetStatus", "heavyalcohol", 200) AlienEffect() end
|
if alcoholCount > 1 and alcoholCount < 4 then
|
||||||
|
TriggerEvent("evidence:client:SetStatus", "alcohol", 200)
|
||||||
|
elseif alcoholCount >= 4 then
|
||||||
|
TriggerEvent("evidence:client:SetStatus", "heavyalcohol", 200)
|
||||||
|
AlienEffect()
|
||||||
end
|
end
|
||||||
if Config.RewardItem == itemName then toggleItem(true, Config.RewardPool[math.random(1, #Config.RewardPool)], 1) end
|
end
|
||||||
|
if Config.RewardItem == itemName then addItem(Config.RewardPool[math.random(1, #Config.RewardPool)], 1) end
|
||||||
end
|
end
|
||||||
|
|
||||||
function addItem(item, amount, info)
|
function addItem(item, amount, info)
|
||||||
|
|||||||
Reference in New Issue
Block a user