Skip to content
PedForge

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:

client.lua
-- /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.

vMenu

Good to know

These steps are for vMenu for FiveM Legacy, the stable vMenu. vMenu for FiveM Enhanced is a separate, newer build, and its docs name no addons.json.

  1. Open resources/vMenu/config/addons.json and put the ped’s name in its peds list, as below. Keep the file’s other lists as they are.

  2. Give the players who may use it vMenu’s permissions for the Player Appearance menu and its addon peds, in the permissions.cfg your server.cfg runs with exec.

  3. Restart the server. The ped is then in vMenu’s list of addon peds.

addons.json
"peds": [  "dillen"],
permissions.cfg
# vMenu: the Player Appearance menu and its addon peds, for the admin groupadd_ace group.admin "vMenu.PlayerAppearance.Menu" allowadd_ace group.admin "vMenu.PlayerAppearance.AddonPeds" allow

Tip

The README.txt in the export’s ZIP has the peds list ready with your ped’s name.

illenium-appearance

  1. Open shared/peds.lua in the illenium-appearance resource. Config.Peds.pedConfig in it is a list of entries, each with the peds it offers.

  2. Add an entry with your ped, as below.

  3. Restart the server.

shared/peds.lua
-- 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:

shared/peds.lua
-- 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:

shared/config.lua
-- every ACE the peds list namesConfig.Aces = { "pedforge.dillen" }
server.cfg
# the group vip may use dillen, and this player is in itadd_ace group.vip pedforge.dillen allowadd_principal identifier.steam:110000112345678 group.vip

Good 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:

peds.json
[  "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.lua
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.