mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-08-17 06:26:03 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce137d9089 | ||
|
|
d7a8a20491 | ||
|
|
38d0b04e71 |
@@ -1,6 +1,6 @@
|
||||
name "Jim-Consumables"
|
||||
author "Jimathy"
|
||||
version "2.0.08"
|
||||
version "2.0.09"
|
||||
description "Consumables Script"
|
||||
fx_version "cerulean"
|
||||
game "gta5"
|
||||
|
||||
@@ -120,10 +120,8 @@ RegisterNetEvent(getScript()..":server:finishConsume", function(needTypes)
|
||||
removeItem(isConsuming[src].item, 1, src)
|
||||
if isConsuming[src].rewardItem then
|
||||
debugPrint("^5Debug^7: ^2Giving player ^3"..src.." ^2reward items^7")
|
||||
for i = 1, #isConsuming[src].rewardItem do
|
||||
local item = isConsuming[src].rewardItem[i]
|
||||
addItem(item.item, item.amount, nil, src)
|
||||
end
|
||||
local item = isConsuming[src].rewardItem
|
||||
addItem(item.item, item.amount, nil, src)
|
||||
end
|
||||
if isConsuming[src].returnItem then
|
||||
debugPrint("^5Debug^7: ^2Giving player ^3"..src.." ^2return item^7")
|
||||
@@ -133,11 +131,9 @@ RegisterNetEvent(getScript()..":server:finishConsume", function(needTypes)
|
||||
end
|
||||
end
|
||||
if isConsuming[src].packItem then
|
||||
for i = 1, #isConsuming[src].packItem do
|
||||
debugPrint("^5Debug^7: ^2Giving player ^3"..src.." ^2Pack items^7")
|
||||
local item = isConsuming[src].packItem[i]
|
||||
addItem(item.item, item.amount, nil, src)
|
||||
end
|
||||
local item = isConsuming[src].packItem
|
||||
addItem(item.item, item.amount, nil, src)
|
||||
end
|
||||
|
||||
-- Needs
|
||||
|
||||
@@ -15,6 +15,7 @@ function GenerateRandomValues(data)
|
||||
transData[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
if transData.hunger > 0 then
|
||||
transData.hunger = transData.hunger > 100 and 100 or transData.hunger
|
||||
end
|
||||
@@ -26,12 +27,13 @@ function GenerateRandomValues(data)
|
||||
if transData.stress > 0 then
|
||||
transData.stress = transData.stress > 100 and 100 or transData.stress
|
||||
end
|
||||
|
||||
return transData["time"],
|
||||
transData["heal"],
|
||||
transData["armor"],
|
||||
{
|
||||
hunger = transData["hunger"],
|
||||
thirst = transData["thirst"],
|
||||
stress = transData["stress"]
|
||||
hunger = transData["hunger"] or 0,
|
||||
thirst = transData["thirst"] or 0,
|
||||
stress = transData["stress"] or 0
|
||||
}
|
||||
end
|
||||
@@ -1,7 +1,6 @@
|
||||
2.0.08
|
||||
2.0.09
|
||||
|
||||
- Fix issues with stress calculations
|
||||
- Separates "drug control" from canOD boolean
|
||||
- Adds support for jim_bridge built-in synchronized alcohol/drug effects
|
||||
- Fix possible issue with nil needTypes tables being sent
|
||||
- Fix packitems and return items not giving any items
|
||||
|
||||
https://github.com/jimathy/jim-consumables/releases/latest
|
||||
Reference in New Issue
Block a user