forked from Simnation/Main
ed
This commit is contained in:
parent
d271b73053
commit
307f4c0d90
2 changed files with 6 additions and 27 deletions
|
@ -1,13 +1,5 @@
|
|||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent("chema_shisha:pay")
|
||||
AddEventHandler("chema_shisha:pay", function(entity)
|
||||
local src = source
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
|
||||
Player.Functions.RemoveMoney("cash", 20, "shisha-session")
|
||||
end)
|
||||
|
||||
RegisterServerEvent("eff_smokes")
|
||||
AddEventHandler("eff_smokes", function(entity)
|
||||
TriggerClientEvent("c_eff_smokes", -1, entity)
|
||||
|
@ -17,21 +9,15 @@ QBCore.Functions.CreateUseableItem('shisha', function(source, item)
|
|||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
|
||||
if Player.Functions.RemoveItem(item.name, 1, item.slot) then
|
||||
TriggerClientEvent('QBCore:Notify', source, 'The shisha was set up.', 'success')
|
||||
TriggerClientEvent('QBCore:Notify', source, 'Die Shisha wurde aufgebaut.', 'success')
|
||||
TriggerClientEvent("chema_shisha:spawn", -1, entity)
|
||||
end
|
||||
end)
|
||||
|
||||
QBCore.Commands.Add("deleteshisha", "Delete your shisha and get it back in inventory", {}, false, function(source)
|
||||
QBCore.Commands.Add("deleteshisha", "Lösche deine Shisha und bekomme sie zurück ins Inventar", {}, false, function(source)
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
|
||||
TriggerClientEvent("chema_shisha:delete", -1, entity)
|
||||
Player.Functions.AddItem("shisha", 1)
|
||||
TriggerClientEvent('QBCore:Notify', source, 'Shisha removed and returned to inventory', 'success')
|
||||
end)
|
||||
|
||||
QBCore.Commands.Add("shisha", "Spawn a shisha", {}, false, function(source)
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
|
||||
TriggerClientEvent("chema_shisha:spawn", -1, entity, Player)
|
||||
TriggerClientEvent('QBCore:Notify', source, 'Shisha entfernt und ins Inventar zurückgelegt', 'success')
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue