old SpawnCharacter commented away as i updated it to suit my own setup

change display in main-container css if u dont have a way to trigger "kashactersS:SetupCharacters"  and "kashactersC:SetupCharacters"
This commit is contained in:
Henric Backman
2020-04-30 00:37:06 +02:00
parent 55b126172a
commit 44e3f894cc
3 changed files with 101 additions and 40 deletions
+15
View File
@@ -35,13 +35,18 @@ end)
RegisterServerEvent("kashactersS:CharacterChosen")
AddEventHandler('kashactersS:CharacterChosen', function(charid, ischar)
local src = source
-- local spawn = {}
local isnew = true
SetLastCharacter(src, tonumber(charid))
SetCharToIdentifier(GetPlayerIdentifiers(src)[2], tonumber(charid))
if ischar == "true" then
isnew = false
--spawn = GetSpawnPos(src)
--TriggerClientEvent("kashactersC:SpawnCharacter", src, spawn)
else
TriggerClientEvent('skinchanger:loadDefaultModel', src, true, cb)
--TriggerEvent('esx_identity:showRegisterIdentity')
--TriggerClientEvent("kashactersC:SpawnCharacter", src, spawn)
end
TriggerClientEvent("kashactersC:SpawnCharacter", src, isnew)
end)
@@ -69,6 +74,11 @@ function GetPlayerCharacters(source)
else
Chars[i].job_grade = charJobgrade[1].label
end
if Chars[i].sex == "m" then
Chars[i].sex = "Male"
else
Chars[i].sex = "Female"
end
end
return Chars
end
@@ -105,6 +115,11 @@ function DeleteCharacter(identifier, charid)
end
end
--function GetSpawnPos(source)
-- local SpawnPos = MySQLAsyncExecute("SELECT `position` FROM `users` WHERE `identifier` = '"..GetPlayerIdentifiers(source)[2].."'")
-- return json.decode(SpawnPos[1].position)
--end
function GetIdentifierWithoutLicense(Identifier)
return string.gsub(Identifier, "license", "")
end