Use the ped in the game
Once the ped’s resource runs on your server, players need a way to become the ped. Here is how with a script of your own, vMenu, illenium-appearance, fivem-appearance and qb-clothing. The examples use a ped called dillen.
The ped’s name
Every menu and script finds the ped by its model name: the name in its peds.meta and its files, dillen for dillen.ydd. It is the name the ped had when you exported it.
Make sure the ped loads before you add it to a menu: its resource is in server.cfg with ensure, and the server has been restarted since.
From a script: SetPlayerModel
In a resource of your own, a client script turns the player into the ped with the native SetPlayerModel. Load the model first and wait until it has loaded, as FiveM’s reference for the native says:
-- /dillen turns the player into the pedRegisterCommand('dillen', function() local model = GetHashKey('dillen') if not IsModelInCdimage(model) or not IsModelValid(model) then print('dillen is not streamed: is its resource started?') return end RequestModel(model) while not HasModelLoaded(model) do Wait(0) end SetPlayerModel(PlayerId(), model) SetModelAsNoLongerNeeded(model)end, false)SetPlayerModel replaces the player’s ped, so a script that kept the old ped must take PlayerPedId() again.
Good to know
Every player can run a client command like this one. To keep the ped to some players, use one of the menus below, which have permissions of their own.
FiveM natives: SetPlayerModel (opens in a new tab)docs.fivem.net
illenium-appearance
Open
shared/peds.luain the illenium-appearance resource.Config.Peds.pedConfigin it is a list of entries, each with the peds it offers.Add an entry with your ped, as below.
Restart the server.
-- a new entry in Config.Peds.pedConfig: the ped for everyone{ peds = { "dillen" },},The peds show in the menu the command /pedmenu opens. By default only group.admin may use it: Config.EnablePedMenu and Config.PedMenuGroup in shared/config.lua decide.
An entry without limits offers its peds to everyone. Give it jobs, gangs, aces or citizenids, and only players with one of them get its peds; one match is enough:
-- the ped only for the police job, or for whoever has the ACE{ peds = { "dillen" }, jobs = { "police" }, aces = { "pedforge.dillen" },},An ACE an entry names must also be in Config.Aces in shared/config.lua, and players get it in server.cfg with add_ace, given to a group or to a player:
-- every ACE the peds list namesConfig.Aces = { "pedforge.dillen" }# the group vip may use dillen, and this player is in itadd_ace group.vip pedforge.dillen allowadd_principal identifier.steam:110000112345678 group.vipGood to know
illenium-appearance’s old documentation address no longer leads to its documentation. Go by the files in the resource and its GitHub page.
fivem-appearance
fivem-appearance keeps the peds a player may choose from in peds.json in the resource’s folder, a plain list of names. Add the ped’s name last, with a comma after the name before it:
[ "a_f_m_beach_01", "a_f_m_bevhills_01", "dillen"]Restart the resource. The ped is offered where your server’s scripts open fivem-appearance with the ped choice on. Its documentation says nothing about keeping peds to some players.
qb-clothing (QBCore)
qb-clothing takes the peds it offers from two lists in its config.lua: Config.ManPlayerModels for male characters and Config.WomanPlayerModels for female ones. Add the ped’s name to the list for its gender:
Config.ManPlayerModels = { 'mp_m_freemode_01', -- the peds already in the list 'dillen',}Restart the server. qb-clothing then offers the ped to characters of that gender in its clothing menu. Staff with qb-adminmenu can also open that menu for a player with Give Clothing Menu. The lists have no job or permission limits.
Good to know
Many QBCore servers use illenium-appearance instead of qb-clothing. Then add the ped as that section says.
If the ped is not in the menu
If the ped does not show in a menu, or spawns invisible, check that its resource starts and that the name is right, then go through the guide on peds that are invisible or crash. Ped check finds most of it in a minute.