Reverted some changes later to be fixed

This commit is contained in:
Niko
2022-08-04 23:03:44 -04:00
committed by GitHub
parent a64b7aab93
commit ca6b336863
2 changed files with 14 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
author "Andyyy#7666, N1K0#0001" author "Andyyy#7666, N1K0#0001"
description "ND Character Selection (DOJ Based)" description "ND Character Selection (DOJ Based)"
version "2.2.0" version "2.2.1"
fx_version "cerulean" fx_version "cerulean"
game "gta5" game "gta5"

View File

@@ -13,6 +13,7 @@ function startChangeAppearence()
props = true, props = true,
tattoos = false tattoos = false
} }
exports["fivem-appearance"]:startPlayerCustomization(function(appearance) exports["fivem-appearance"]:startPlayerCustomization(function(appearance)
if (appearance) then if (appearance) then
local ped = PlayerPedId() local ped = PlayerPedId()
@@ -113,18 +114,19 @@ AddEventHandler("ND:returnCharacters", function(characters)
SetDisplay(true, "ui", background, characters) SetDisplay(true, "ui", background, characters)
end) end)
-- [TODO] to be implemented properly later
-- Set the player to creating the ped if they haven't already. -- Set the player to creating the ped if they haven't already.
RegisterNetEvent("ND:setCharacter") -- RegisterNetEvent("ND:setCharacter")
AddEventHandler("ND:setCharacter", function(character) -- AddEventHandler("ND:setCharacter", function(character)
if next(character.clothing) == nil then -- if next(character.clothing) == nil then
changeAppearence = true -- changeAppearence = true
else -- else
changeAppearence = false -- changeAppearence = false
local ped = PlayerPedId() -- local ped = PlayerPedId()
exports["fivem-appearance"]:setPedTattoos(ped, character.clothing.tattoos) -- exports["fivem-appearance"]:setPedTattoos(ped, character.clothing.tattoos)
exports["fivem-appearance"]:setPedAppearance(ped, character.clothing.appearance) -- exports["fivem-appearance"]:setPedAppearance(ped, character.clothing.appearance)
end -- end
end) -- end)
-- Selecting a player from the iu. -- Selecting a player from the iu.
RegisterNUICallback("setMainCharacter", function(data) RegisterNUICallback("setMainCharacter", function(data)