You can always edit the code to your likening and add code to end the emote
local position = GetEntityCoords(PlayerPedId())
local usePolePosition = false
local scenarioDuration = 30000 -- Set the duration in milliseconds (30 seconds in this example)
if not args.coords then args.coords = position end
if args.dance then
local nearbyObjects = lib.getNearbyObjects(args.coords, 1.5)
if #nearbyObjects > 0 then
local closestObject = nearbyObjects[1]
local scene = NetworkCreateSynchronisedScene(closestObject.coords.x + 0.07, closestObject.coords.y + 0.3,
closestObject.coords.z + 1.15, 0.0, 0.0, 0.0, 2, false, true, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(PlayerPedId(), scene, 'mini@strip_club@pole_dance@pole_dance' .. args.dance,
'pd_dance_0' .. args.dance, 1.5, -4.0, 1, 1, 1148846080, 0)
NetworkStartSynchronisedScene(scene)
-- Automatically end the emote after a certain duration
Citizen.Wait(scenarioDuration)
TaskLeaveAnyScenario(PlayerPedId())
else
usePolePosition = true
end
elseif args.lapdance then
lib.requestAnimDict(args.dict)
TaskPlayAnim(PlayerPedId(), tostring(args.dict), tostring(args.anim), 1.0, 1.0, -1, 1, 0, 0, 0, 0)
-- Automatically end the emote after a certain duration
Citizen.Wait(scenarioDuration)
TaskClearAll(PlayerPedId())
else
for _, point in ipairs(polePoints) do
if IsPlayerNearCoords(position, point.coords, point.distance) then
usePolePosition = true
break
end
end
end```
``` if usePolePosition then
local closestPoint = lib.points.getClosestPoint()
if closestPoint then
if Config.Debug then print('Close') end
args.coords = closestPoint.coords
local scene = NetworkCreateSynchronisedScene(args.coords.x + 0.07, args.coords.y + 0.3,
args.coords.z + 1.15, 0.0, 0.0, 0.0, 2, false, true, 1065353216, 0, 1.3)
NetworkAddPedToSynchronisedScene(PlayerPedId(), scene, 'mini@strip_club@pole_dance@pole_dance' .. args.dance,
'pd_dance_0' .. args.dance, 1.5, -4.0, 1, 1, 1148846080, 0)
NetworkStartSynchronisedScene(scene)
-- Automatically end the emote after a certain duration
Citizen.Wait(scenarioDuration)
TaskLeaveAnyScenario(PlayerPedId())
else
if Config.Debug then print('Not close') end
end
end
end)```