Skip to content

Commit

Permalink
fix! Gender usage in ESX
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy-Dylan committed Mar 31, 2024
1 parent 4fbb6c2 commit 097db9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,20 @@ local function openMenu(job)
if base == 0 then gender = 'male' else gender = 'female' end
elseif Shared.Framework == 'esx' then
gender = ESX.PlayerData.sex
if gender == 'm' then
gender = 'male'
else
gender = 'female'
end
elseif Shared.Framework == 'standalone' then
if IsPedMale(cache.ped) then gender = 'male' else gender = 'female' end
job = { name = job, label = job }
end

local options = {}

print(gender)

if Shared.Clothing[job.name] == nil then
lib.notify({ title = 'Mikey\'s EUP 1.3', description = 'Er is voor deze baan momenteel geen kleding beschikbaar of deze is nog niet ingesteld.', iconAnimation = 'beatFade', duration = 7500, type = 'error' })
return
Expand Down
7 changes: 1 addition & 6 deletions shared/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@ Shared.Army = 'defensie' -- done
Shared.SpecialForces = 'dsi' -- done

-- Frameworks
Shared.Framework = 'qb-core' -- 'qb-core' or 'esx' or 'standalone'
Shared.Framework = 'esx' -- 'qb-core' or 'esx' or 'standalone'

Shared.Clothing = {}

if Shared.Framework == 'qb-core' then
QBCore = exports['qb-core']:GetCoreObject()
end

if Shared.Framework == 'esx' then
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
end

0 comments on commit 097db9e

Please sign in to comment.