forked from Simnation/Main
wd
This commit is contained in:
parent
307f4c0d90
commit
1c16382e41
10 changed files with 307 additions and 2 deletions
|
@ -163,14 +163,14 @@ AddEventHandler("chema_shisha:Drag", function()
|
|||
local VapeFailure = math.random(1,99999)
|
||||
if VapeFailure == 1 then
|
||||
TaskPlayAnim(ped, ad, anim, 8.00, -8.00, -1, (2 + 16 + 32), 0.00, 0, 0, 0)
|
||||
PlaySoundFrontend(-1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", 1)
|
||||
TriggerServerEvent('InteractSound_SV:PlayOnSource', 'shisha_bubbling', 0.5)
|
||||
Wait(250)
|
||||
AddExplosion(PedPos.x, PedPos.y, PedPos.z+1.00, 34, 0.00, true, false, 1.00)
|
||||
ApplyDamageToPed(ped, 200, false)
|
||||
TriggerServerEvent("Vape:Failure", 0)
|
||||
else
|
||||
TaskPlayAnim(ped, ad, anim, 8.00, -8.00, -1, (2 + 16 + 32), 0.00, 0, 0, 0)
|
||||
PlaySoundFrontend(-1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", 1)
|
||||
TriggerServerEvent('InteractSound_SV:PlayOnSource', 'shisha_bubbling', 0.5)
|
||||
Wait(950)
|
||||
TriggerServerEvent("eff_smokes", PedToNet(ped))
|
||||
Wait(1000)
|
||||
|
@ -236,3 +236,28 @@ function DrawText3D(coords, text, size)
|
|||
DrawText(x, y)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent("chema_shisha:deleteAll")
|
||||
AddEventHandler("chema_shisha:deleteAll", function()
|
||||
-- Delete all shishas in the area
|
||||
for i = 1, #shisha do
|
||||
local objectHash = shisha[i]
|
||||
local radius = 100.0 -- Search in a 100.0 radius around the player
|
||||
|
||||
local ped = PlayerPedId()
|
||||
local pos = GetEntityCoords(ped)
|
||||
|
||||
-- Find all objects of this type
|
||||
local shishaObj = GetClosestObjectOfType(pos.x, pos.y, pos.z, radius, objectHash, false, false, false)
|
||||
while DoesEntityExist(shishaObj) do
|
||||
DeleteObject(shishaObj)
|
||||
-- Look for the next one
|
||||
shishaObj = GetClosestObjectOfType(pos.x, pos.y, pos.z, radius, objectHash, false, false, false)
|
||||
end
|
||||
end
|
||||
|
||||
-- Also delete any mobile hookahs that might be out
|
||||
if DoesEntityExist(mobilehooka) then
|
||||
DeleteObject(mobilehooka)
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue