client/editable.lua
function openOutfitMenu(name)
local PlayerData = xports["tgiann-core"]:getPlayerData()
local outfitName = "dolap_" .. (name or "default") .. "_" .. (PlayerData.citizenid or PlayerData.identifier)
TriggerServerEvent("inventory:server:OpenInventory", "stash", outfitName, { maxweight = 1, slots = 500 }, { isPlayer = true })
end
RegisterNetEvent('qb-clothing:client:openOutfitMenu') -- QB open outfit menu event
AddEventHandler('qb-clothing:client:openOutfitMenu', function(name)
if not config.clothingAsItem then
openOutfitMenu(name)
else
TriggerEvent("tgiann-clothing:openOutfitMenu")
end
end)
RegisterNetEvent('tgiann-clothing:openOutfitStash')
AddEventHandler('tgiann-clothing:openOutfitStash', openOutfitMenu)
RegisterNetEvent('qb-clothing:client:loadPlayerClothing') -- QB Multichar load ped
AddEventHandler('qb-clothing:client:loadPlayerClothing', loadPedClothing)
function canRefreshSkin()
--return not exports["qb-customs"]:inMechanicMenu()
return true
end
function uiIsOpen(open)
if open then
TriggerEvent("tgiann-hud:ui", false)
else
TriggerEvent("tgiann-hud:ui", true)
end
if config.displayRadar then
DisplayRadar(not open)
end
end
function genderToModel(PlayerData)
if config.framework == "qb" then
return PlayerData.charinfo.gender == 1 and `mp_f_freemode_01` or `mp_m_freemode_01`
else
return PlayerData.sex == "f" and `mp_f_freemode_01` or `mp_m_freemode_01`
end
end
function setCamActive()
--exports["tgiann-abskill"]:camActive()
end
function teleportPlayer(x, y, z)
SetEntityCoords(PlayerPedId(), x, y, z)
--exports["tgiann-abskill"]:teleportPlayer(false, x, y, z)
end
function canInspect()
if exports["tgiann-hud"]:isDoingAction() then
tgiCore.notif("Bir Şey Yaparken Kıyafet İncelemeyi Kullanamazsın!", "error")
return false
end
return true
end
function setHealth(ped, health)
SetEntityHealth(ped, health)
--exports["tgiann-abskill"]:setHealth(ped, health)
end
function setArmour(ped, armor)
SetPedArmour(ped, armor)
--exports["tgiann-abskill"]:setArmour(ped, armor)
end
function skinLoaded()
ClearPedScubaGearVariation(PlayerPedId())
TriggerEvent("esx_tatoo:loadTattoo")
TriggerEvent("tgiann-bettercombat:setLastWalking")
end
function createFirstCharacter()
--exports["tgiann-wiki"]:startWiki()
TriggerEvent("tgiann-main:afk-control", false)
TriggerServerEvent("jsfour-idcard:give-idCard")
end
function FirstCharacterCreated()
TriggerEvent("tgiann-main:afk-control", true)
TriggerEvent('tgiann-main:checkProfileSettings')
end
for i = 1, #config.Stores do
local store = config.Stores[i]
store.zone:onPlayerInOut(function(isPointInside, _)
inAynzZone = isPointInside
if inAynzZone then
exports["tgiann-core"]:contextOpen(string.format("[ H ] %s", store.shopType == "barber" and lang.blipBarberShop or lang.blipClothingShop))
else
exports["tgiann-core"]:contextClose()
end
CreateThread(function()
while inAynzZone do
Wait(0)
if IsControlJustPressed(0, 74) then
exports["tgiann-core"]:contextClose()
if store.shopType == "clothing" then
openMenu({
allowedMenus = { [0] = false, [1] = true, [2] = false, [3] = true },
adminMode = false,
isBerberMenu = false
})
elseif store.shopType == "barber" then
openMenu({
allowedMenus = { [0] = false, [1] = false, [2] = true, [3] = false },
adminMode = false,
isBerberMenu = true
})
end
end
end
end)
end)
end
Last updated