Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gregos1810/esx_unishow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: esx-community/esx_unishow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 17, 2020

  1. Copy the full SHA
    d35c316 View commit details
  2. Minor cleanup

    rex2630 authored Jan 17, 2020
    Copy the full SHA
    7b401a4 View commit details
Showing with 20 additions and 41 deletions.
  1. +17 −40 client.lua
  2. +3 −1 __resource.lua → fxmanifest.lua
57 changes: 17 additions & 40 deletions client.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ESX = nil
ESX = nil

Citizen.CreateThread(function()
while ESX == nil do
@@ -7,9 +7,7 @@ Citizen.CreateThread(function()
end
end)


function OpenPositionMenu(zone)

local elements = {}

for k,v in pairs(Config.Salle) do
@@ -19,37 +17,32 @@ function OpenPositionMenu(zone)
})
end


ESX.UI.Menu.CloseAll()

ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'strip',
{
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'strip', {
title = 'Position Menu',
elements = elements
},
function(data, menu)
}, function(data, menu)
OpenDancerMenu(data.current,zone)
end,
function(data, menu)
end, function(data, menu)

menu.close()

CurrentAction = 'strip_menu'
CurrentActionMsg = 'menu'
CurrentActionData = {zone = zone}
end
)
end)
end

function OpenDancerMenu(position,zone)
local position = position
local elements = {}
table.insert(elements,{
label = 'Personne',
hash = '',
type = ''

})

for i=1,#Config.Ped do
table.insert(elements,{
label = Config.Ped[i].label,
@@ -61,65 +54,55 @@ function OpenDancerMenu(position,zone)

ESX.UI.Menu.CloseAll()

ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'strip',
{
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'strip', {
title = 'Dancer Menu',
elements = elements
},
function(data, menu)
}, function(data, menu)

if data.current.label == 'Personne' then
print(position.label)
TriggerServerEvent('esx_unishow:DeleteShow',position.label)
else
OpenDanceMenu(data.current,position,zone)
end
end,
function(data, menu)
end, function(data, menu)

menu.close()

CurrentAction = 'strip_menu'
CurrentActionMsg = 'menu'
CurrentActionData = {zone = zone}
end
)
end)
end

function OpenDanceMenu(dancer,position,zone)
local position = position
local dancer = dancer
local elements = {}
for k,v in pairs(Config.Dict) do

for k,v in pairs(Config.Dict) do
table.insert(elements,{
label = v.label,
name = v.name,
anim = v.anim,

})
end

ESX.UI.Menu.CloseAll()

ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'strip',
{
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'strip', {
title = 'Dance Menu',
elements = elements
},
function(data, menu)
}, function(data, menu)
showUni(data.current,dancer,position)
end,
function(data, menu)
end, function(data, menu)

menu.close()

CurrentAction = 'strip_menu'
CurrentActionMsg = 'menu'
CurrentActionData = {zone = zone}
end
)
end)
end

function showUni(dance,dancer,position)
@@ -149,25 +132,19 @@ AddEventHandler('esx_unishow:StopDance',function(ped)
DeletePed(ped)
end)


AddEventHandler('esx_unishow:hasEnteredMarker', function(zone)

CurrentAction = 'strip_menu'
CurrentActionMsg = 'appuyez sur ~INPUT_CONTEXT~ pour choisir les shows'
CurrentActionData = {zone = zone}


end)

AddEventHandler('esx_unishow:hasExitedMarker', function(zone)

CurrentAction = nil
ESX.UI.Menu.CloseAll()

end)



Citizen.CreateThread(function()
while true do
Wait(0)
4 changes: 3 additions & 1 deletion __resource.lua → fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
fx_version 'adamant'

game 'gta5'

description 'ESX STRIP'