Hey, i wanted to set more Poledances, because i have Allhousing and would like to have a DancePole in my House. How can i make more then the 3 Places to dance? And what do i have to look out? thx
Changed it a bit for ESX, So you can choose what animation to do
ESX = nil
TriggerEvent('esx:getsharedobject', function(obj) ESX = obj end)
FishyDEV = false
local value = nil
Citizen.CreateThread(function()
while true do
local _sleep = 1000
local _char = PlayerPedId()
local _charPos = GetEntityCoords(_char)
for k, v in pairs(Config['PoleDance']['Locations']) do
if #(_charPos - v['Position']) < 1.5 then
_sleep = 0
if IsControlJustReleased(0, 51) and not FishyDEV then
ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'pole',
{
title = "Barra",
align = 'bottom-right',
elements = {
{label = "Baile 1" ,value = "1"},
{label = "Baile 2" ,value = "2"},
{label = "Baile 3" ,value = "3"}
}
},
function(data, menu)
FishyDEV = true
LoadDict('mini@strip_club@pole_dance@pole_dance' .. data.current.value)
local scene = NetworkCreateSynchronisedScene(v['Position'], vector3(0.0, 0.0, 0.0), 2, false, false, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(PlayerPedId(), scene, 'mini@strip_club@pole_dance@pole_dance' .. data.current.value, 'pd_dance_0' .. data.current.value, 1.5, -4.0, 1, 1, 1148846080, 0)
NetworkStartSynchronisedScene(scene)
end,
function(data, menu)
menu.close()
end)
elseif IsControlJustReleased(0, 51) and FishyDEV then
FishyDEV = false
ClearPedTasks(PlayerPedId())
end
end
end
Citizen.Wait(_sleep)
end
end)
LoadDict = function(Dict)
while not HasAnimDictLoaded(Dict) do
Wait(0)
RequestAnimDict(Dict)
end
end
This would be much better if you could somehow get it linked to the pole prop instead of vector coords. It is such a pain to get it lined up correctly with a pole if you want to add new ones.