-
Notifications
You must be signed in to change notification settings - Fork 13
Models Configuration
This page is for the Models config in PlayerModelChanger.json.
{
"Models": {
// !!!NOTICE: this configuration is an example, don't use it directly
"model_index": {
"name": "model name",
"path": "model path",
"side": "T/CT/ALL",
"permissions": [],
"permissionsOr": [],
"disableleg": true,
"hideinmenu": true,
"fixedmeshgroups": {},
"meshgroups": {}
},
}
}
- Should be unique and as simple as possible.
- The index of the model. More specifically, this is the id of the model which will be stored into database.
- Optional.
- Default: the value of
model_index - The name of the model. More specifically, it is the name which will be displayed in menu.
- It is not recommended to set it too long.
- Must be set.
- the path of the model.
Important
The path is in the vpk filesystem. For example, if you open pak01_dir.vpk you will find a characters folder and player models file in it (end with .vmdl_c). In this case your path will be like characters/.../xxx.vmdl. Workshop vpks are the same.
Important
your model files should be ended with .vmdl_c. But your path should ends with .vmdl.
- Optional.
- Value: a list, which contains all the requirements to use the model.
- example:
["@vip/flag1", "#vip/group1", "7656XXXXX"] - If the string starts with
@, it will be recognized as a counterstrikesharp permission flag. - If the string starts with
#, it will be recognized as a counterstrikesharp permission group. - Otherwise, it will be recognized as a player SteamID64, and this model will be only available to that player.
Important
This config use the AND condition, which means if player didn't meet any of the requirements, he can't use the model. if you want to use OR condition, see permissionsOr.
- Optional.
- Basically the same as
permissions, but it use aORcondition.
Important
You shouldn't set both permissions and permissionsOr for the same model in the theory. But if you still want to do this, please be aware that the model will be available only if permissions and permissionsOr are all met.
- Optional.
- Default:
false - control the visibility of the legs of the model.
- Optional.
- Default:
false - control the visibility of the model in the menu.
Warning
This config only controls the visibility. It doesn't really ban your player from using this model, which means if your player have it in some way, it won't be reset by the permission check.
For the models with multiple meshgroup, see Meshgroup Configuration