forked from Simnation/Main
fix
This commit is contained in:
parent
a0175cbe69
commit
1c20ce80a1
3 changed files with 51 additions and 107 deletions
|
@ -7,7 +7,7 @@ end
|
|||
|
||||
RegisterNetEvent('shisha-script:consumeTobacco')
|
||||
AddEventHandler('shisha-script:consumeTobacco', function(requirements)
|
||||
Debug("Consume tobacco event triggered")
|
||||
Debug("Tabak-Verbrauch-Event ausgelöst")
|
||||
local src = source
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
|
||||
|
@ -22,7 +22,7 @@ AddEventHandler('shisha-script:consumeTobacco', function(requirements)
|
|||
end
|
||||
|
||||
if hasAllItems then
|
||||
Debug("Player has all required items")
|
||||
Debug("Spieler hat alle benötigten Items")
|
||||
-- Entferne die benötigten Items
|
||||
for _, requirement in ipairs(requirements) do
|
||||
Player.Functions.RemoveItem(requirement.item, requirement.amount)
|
||||
|
@ -31,7 +31,7 @@ AddEventHandler('shisha-script:consumeTobacco', function(requirements)
|
|||
|
||||
TriggerClientEvent('QBCore:Notify', src, "Du hast die Shisha vorbereitet!", "success")
|
||||
else
|
||||
Debug("Player missing required items")
|
||||
Debug("Spieler hat nicht alle benötigten Items")
|
||||
TriggerClientEvent('QBCore:Notify', src, "Du hast nicht alle benötigten Zutaten!", "error")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue