Characters
The Characters module handles everything related to character customisation, including appearance styles, tattoos, clothing, and genetics. It is fully client-side and provides a consistent structure for defining, resetting, and applying player ped appearance.
Accessing the Module
Client
get_style(sex)
Retrieves the current appearance data structure for the given sex.
Parameters
sex
string
Either "m"
or "f"
to get the appropriate structure.
Example
reset_styles()
Resets all style data back to defaults for both male and female presets.
Parameters
None
Example
get_clothing_and_prop_values(sex)
Returns maximum drawable/texture values for clothing and props for UI sliders.
Parameters
sex
string
Either "m"
or "f"
Returns
A table of maximum drawable values.
Example
set_ped_appearance(player, data)
Applies the full style data (genetics, hair, clothing, etc.) to the specified ped.
Parameters
player
number
The PlayerPedId()
to apply the style to.
data
table
The full character style data table.
Example
update_ped_data(sex, category, id, value)
Updates a specific field in the ped style table and applies the changes to the current ped.
Parameters
sex
string
"m" or "f" to choose the dataset
category
string
The sub-table: "genetics", "barber", or "clothing"
id
string
The field inside the category to update
value
number
or table
The value to assign
Example
change_player_ped(sex)
Changes the current player's ped model and reapplies stored appearance.
Parameters
sex
string
"m" or "f"
Example
rotate_ped(direction)
Rotates the current ped preview left, right, flip or reset.
Parameters
direction
string
"right", "left", "flip", or "reset"
Example
load_character_model(data)
Sets the current player's model and applies the entire style set from saved character data.
Parameters
data
table
The full identity and style structure used in character systems.
Example
Notes
All functions are client-only
Style tables are separated by sex (
m
,f
)Update functions apply changes immediately to ped
You can deep copy and modify style structures before applying them
Last updated