From a918d137e5fd0d2bbf6e3b68ee8ba2acafa46293 Mon Sep 17 00:00:00 2001 From: Nordi98 Date: Thu, 14 Aug 2025 13:23:21 +0200 Subject: [PATCH] ed --- resources/[inventory]/shisha/client.lua | 15 --------------- resources/[inventory]/shisha/server.lua | 10 ---------- 2 files changed, 25 deletions(-) diff --git a/resources/[inventory]/shisha/client.lua b/resources/[inventory]/shisha/client.lua index 5e43e06be..0cd0a4dfd 100644 --- a/resources/[inventory]/shisha/client.lua +++ b/resources/[inventory]/shisha/client.lua @@ -199,20 +199,6 @@ AddEventHandler("chema_shisha:delete", function(source) end end) -RegisterNetEvent("chema_shisha:spawn") -AddEventHandler("chema_shisha:spawn", function(source, xPlayer) - local playerPed = GetPlayerPed(-1) - local coords = GetEntityCoords(playerPed) - - local model = GetHashKey('prop_bong_01') - RequestModel(model) - while not HasModelLoaded(model) do - Wait(0) - end - - mobilehooka = CreateObject(model, coords.x+0.5, coords.y+0.1, coords.z-0.7, true, true, false) -end) - -- Helper function for 3D text function DrawText3D(coords, text, size) local onScreen, x, y = World3dToScreen2d(coords.x, coords.y, coords.z) @@ -261,4 +247,3 @@ AddEventHandler("chema_shisha:deleteAll", function() DeleteObject(mobilehooka) end end) - diff --git a/resources/[inventory]/shisha/server.lua b/resources/[inventory]/shisha/server.lua index 4fe5330e5..4d2e64cdd 100644 --- a/resources/[inventory]/shisha/server.lua +++ b/resources/[inventory]/shisha/server.lua @@ -5,15 +5,6 @@ AddEventHandler("eff_smokes", function(entity) TriggerClientEvent("c_eff_smokes", -1, entity) end) -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, 'Die Shisha wurde aufgebaut.', 'success') - TriggerClientEvent("chema_shisha:spawn", -1, entity) - end -end) - QBCore.Commands.Add("deleteshisha", "Lösche deine Shisha und bekomme sie zurück ins Inventar", {}, false, function(source) local Player = QBCore.Functions.GetPlayer(source) @@ -33,4 +24,3 @@ QBCore.Commands.Add("deleteallshishas", "Delete all placed shishas on the server TriggerClientEvent('QBCore:Notify', source, 'You do not have permission to use this command', 'error') end end) -