After pasting the code above, it should look like below.
functionQBCore.Player.CreatePlayer(PlayerData,Offline)local self = {} self.Functions = {} self.PlayerData = PlayerData self.Offline = Offline-- THESE PLACES ARE ACTUALLY FULL OF CODES-- THESE PLACES ARE ACTUALLY FULL OF CODES self.Functions.Save=function() QBCore.Player.Save(self.PlayerData.source)end QBCore.Players[self.PlayerData.source] = self QBCore.Player.Save(self.PlayerData.source)-- At this point we are safe to emit new instance to third party resource for load handlingTriggerEvent('QBCore:Server:PlayerLoaded', self) self.Functions.UpdatePlayerData()TriggerEvent('wais:sendNewCharacterData', PlayerData.source, PlayerData.cid, PlayerData.citizenid)end
If you have a newer player lua file it should look like below.
functionQBCore.Player.CreatePlayer(PlayerData,Offline)local self = {} self.Functions = {} self.PlayerData = PlayerData self.Offline = Offline-- THESE PLACES ARE ACTUALLY FULL OF CODES-- THESE PLACES ARE ACTUALLY FULL OF CODES-- THESE PLACES ARE ACTUALLY FULL OF CODESif self.Offline thenreturn selfelse QBCore.Players[self.PlayerData.source] = self QBCore.Player.Save(self.PlayerData.source)-- At this point we are safe to emit new instance to third party resource for load handlingTriggerEvent('QBCore:Server:PlayerLoaded', self) self.Functions.UpdatePlayerData()endTriggerEvent('wais:sendNewCharacterData', PlayerData.source, PlayerData.cid, PlayerData.citizenid)end