Comments (3)
Please send here your RegisterNetEvent('esx:playerLoaded') code located at es_extended/client/main.lua, you probably did something wrong there.
Are you using the last esx_identity release?
from esx_kashacter.
Please send here your RegisterNetEvent('esx:playerLoaded') code located at es_extended/client/main.lua, you probably did something wrong there.
Are you using the last esx_identity release?
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(playerData)
ESX.PlayerLoaded = true
ESX.PlayerData = playerData
-- check if player is coming from loading screen
if GetEntityModel(PlayerPedId()) == GetHashKey('PLAYER_ZERO') then
local defaultModel = GetHashKey('a_m_y_stbla_02')
RequestModel(defaultModel)
while not HasModelLoaded(defaultModel) do
Citizen.Wait(10)
end
SetPlayerModel(PlayerId(), defaultModel)
SetPedDefaultComponentVariation(PlayerPedId())
SetPedRandomComponentVariation(PlayerPedId(), true)
SetModelAsNoLongerNeeded(defaultModel)
end
-- freeze the player
FreezeEntityPosition(PlayerPedId(), true)
-- enable PVP
SetCanAttackFriendly(PlayerPedId(), true, false)
NetworkSetFriendlyFireOption(true)
-- disable wanted level
ClearPlayerWantedLevel(PlayerId())
SetMaxWantedLevel(0)
if Config.EnableHud then
for k,v in ipairs(playerData.accounts) do
local accountTpl = '<div><img src="img/accounts/' .. v.name .. '.png"/> {{money}}</div>'
ESX.UI.HUD.RegisterElement('account_' .. v.name, k, 0, accountTpl, {money = ESX.Math.GroupDigits(v.money)})
end
local jobTpl = '<div>{{job_label}} - {{grade_label}}</div>'
if playerData.job.grade_label == '' or playerData.job.grade_label == playerData.job.label then
jobTpl = '<div>{{job_label}}</div>'
end
ESX.UI.HUD.RegisterElement('job', #playerData.accounts, 0, jobTpl, {
job_label = playerData.job.label,
grade_label = playerData.job.grade_label
})
end
ERROR: #20
from esx_kashacter.
@ColeT3tr3x
yes using latest idenity
here is reg event:
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(playerData)
ESX.PlayerLoaded = true
ESX.PlayerData = playerData
--[[-- check if player is coming from loading screen
if GetEntityModel(PlayerPedId()) == GetHashKey('PLAYER_ZERO') then
local defaultModel = GetHashKey('a_m_y_stbla_02')
RequestModel(defaultModel)
while not HasModelLoaded(defaultModel) do
Citizen.Wait(10)
end
SetPlayerModel(PlayerId(), defaultModel)
SetPedDefaultComponentVariation(PlayerPedId())
SetPedRandomComponentVariation(PlayerPedId(), true)
SetModelAsNoLongerNeeded(defaultModel)
end--]]
-- freeze the player
FreezeEntityPosition(PlayerPedId(), true)
-- enable PVP
SetCanAttackFriendly(PlayerPedId(), true, false)
NetworkSetFriendlyFireOption(true)
-- disable wanted level
ClearPlayerWantedLevel(PlayerId())
SetMaxWantedLevel(0)
if Config.EnableHud then
for k,v in ipairs(playerData.accounts) do
local accountTpl = '<div><img src="img/accounts/' .. v.name .. '.png"/> {{money}}</div>'
ESX.UI.HUD.RegisterElement('account_' .. v.name, k, 0, accountTpl, {money = ESX.Math.GroupDigits(v.money)})
end
local jobTpl = '<div>{{job_label}} - {{grade_label}}</div>'
if playerData.job.grade_label == '' or playerData.job.grade_label == playerData.job.label then
jobTpl = '<div>{{job_label}}</div>'
end
ESX.UI.HUD.RegisterElement('job', #playerData.accounts, 0, jobTpl, {
job_label = playerData.job.label,
grade_label = playerData.job.grade_label
})
end
from esx_kashacter.
Related Issues (20)
- Spawning Invisible HOT 3
- esx_identity error for currentIdentity HOT 1
- Cam goes to Sky Help
- esx_identity issue HOT 1
- EVERYTHINGS BROKEN
- commands for esx are nolonger working when esx_kashacter is installed HOT 2
- SCRIPT ERROR: @es_extended/server/main.lua:93: attempt to index a nil value (field '?') HOT 1
- Getting error on connecting with created characters. HOT 1
- esx_kashacters ~ Identity HOT 2
- Does it work with Extendedmode? HOT 1
- Creating Char does not insert into Database HOT 3
- Getting this error. can you please help?
- Followed all instructions
- I get this error HOT 2
- esx commands not working says access denied I've tried reinstalling server multiple times HOT 1
- Duplicate entry HOT 2
- Duplicate Entry
- esx_kashacter + es_extended Error. Help me
- Update for latest identity
- first character works the next few not so much
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esx_kashacter.