[PAID][RELEASE] Set Ped to Player - DataBase Saving System

Dear @LAMHOT,
Can you better describe your question?

What about server using multicharacter identifier? Wouldn’t be easier to pull the identifier without asking for a specific type of identifier in users table like Steam or Rockstar. Would it work with your version?
Thx

can this script be used for 1 player for 1 ped permanently? like no pixels??

Bump @RisWorks

Dear @fredz55, @LAMHOT, @MrHunterPS, @RiskTotakenbeen,
I haven’t been active for the last 10-15 days due to some problems, it doesn’t matter that much now, as soon as I find the time, I’ll help you.

Thank you for your patience.

Hi, do you use asset escrow for this scripts ?

Hello.

The peds are not saving to the database. We get an error in the console:
SCRIPT ERROR: @setped/server/server.lua:137: attempt to index a nil value (field ‘?’)

image

Any help would be appreciated. Using ESX Legacy

2 Likes

Same problem using esx_legacy and esx_multicharacter

cannot add SQL

1101 - BLOB ‘ped’ cannot have default value

Will this be working with Esx Legacy and Esx Multicharacter?
Esx Multicharacter uses a identifier looking like:
char1:************************************************
char2:************************************************
And so on

Error:

Any answers to this ?

Hi there, i will buy this straight away if you can confirm if I can change a ped variation using this? my RP character defaults to the wrong face/ skin colour in every ped system and im struggling to find a system that will force me into the right ped every time! thanks in advance! :slight_smile:

when i put on the ped all my weapons disappear any help?

hey hii,

Does this Script also save ped variations ??
Like we have different dresses for micheal right !! Does it save Dresses also or only the default ped ??

check client.lua

find this line → SetPlayerModel()
then add this line right next after that one → TriggerEvent(‘esx:restoreLoadout’)

Dear customers,
If you could notice, I didn’t answer on the problems, life is unpredictable and you cant know what can happen, problems with inventories, rifles, items, multicharacter, and others will be fixed. In the coming days you can expect a message and an update with a fixed script.

Thank you for your patience. This was not my intention.

2 Likes

Any ETA on the update ? Where to find it when released ?

Is there a way to contact you i got some issues when i add which roles can use the command @SetPed/server/server.lua:115 attempt to ind…

And also the Peds do not get saved to the DB when the player rejoins he ist no longer the PED

This is the fix for multicharacter

in client.lua change this :

AddEventHandler(‘playerSpawned’, function()

if IsSpawned then

   TriggerServerEvent('setPed:onSpawn', ServerPlayer)

   IsSpawned = false

else

    TriggerServerEvent('setPed:onSpawn', ServerPlayer)

    IsSpawned = true

end

end)

and in server.lua this :

RegisterServerEvent(‘setPed:onSpawn’)

AddEventHandler(‘setPed:onSpawn’, function(id)

local identifier = ESX.GetIdentifier(id)

MySQL.Async.fetchAll('SELECT * FROM users WHERE identifier = @license',{

['@license'] = 'char1:'..identifier,

}, function(result)

if result[1].ped ~= Settings.DefaultPedDB then

    TriggerClientEvent('setped', id, result[1].ped)

    Check('You have a ped in the database >> Your ped is set')

else

    Check('You dont have a ped in the database >> Your ped is not set')

end

end)

end)

ps. this modify work only for char1 for now

[RisWorks] FiveM Script → Set Ped to player ( Update v1.04 )

Dear Customers,
I inform you that we have improved the script.
We fixed an issue with a multicharacter system related to ESX legacy.

Customers, you will get email which have download link with updated script.

Your RisWorks team.