A lightweighted counterstrikesharp plugin to change player model.
If you like this plugin, please give a star :)
- Before you use
- Known issues
- Dependencies for custom model
- Installation Guide
- Commands
- Configuration
- How to add your own model
- Common Issues
- Credits
- TODOs
- Contribution
- This plugin is still in development, which means the player's data database structure may be changed (If changed, the database need to be reseted or be modified by your own)
- this plugin can cause a GSLT ban, use at your own risk
- See Known issues
- None
If you are not using custom model, these plugins are not necessarily needed
Download the plugin from latest Release, then put it into your counterstrikesharp plugin folder.
pmc_enable [true/false]
Enable / Disable the pluginpmc_resynccache
Resync cache.
!model
show sender the model he is using + helper!model <@random / model name> <all/ct/t>
change sender's model (@random for random model every spawn)!md / !models <all/ct/t>
select model
!modeladmin [all/steamid] reset [all/ct/t]
Reset player's model.!modeladmin [all/steamid] set [all/ct/t] [model index]
Set player's model.!modeladmin [steamid] check
Check if player's model is not allowed to have, if not then reset it.
When you install the plugin successfully, it will generate counterstrikesharp/configs/plugins/PlayerModelChanger/PlayerModelChanger.json
.
Config the json like this:
// This configuration was automatically generated by CounterStrikeSharp for plugin 'PlayerModelChanger', at 2024/02/23 11:41:05
{
"Models": {
// this configuration is an example, don't use it directly
"model_index": {
"name": "model name",// optional, default value is model index
"path": "model path",
"side": "side (T/CT/ALL)", // optional, T or CT or ALL, default to ALL, case sensitive
"permissions": ["@vip/flag", "#vip/group"], // optional, permission to have this model
"permissionsOr": ["@vip/flag", "#vip/group"], // optional, same as "permissions" but using or condition
"disableleg": true, // optional, hide firstperson leg model if it is set to true, default is false
"hideinmenu": true // optional, hide the model in select menu if true, default is false
},
"mymodel": { // simplest
"path": "characters/XXX/mymodel.vmdl",
}
},
"MenuType": "chat", // "chat" or "centerhtml", default "chat"
"StorageType": "sqlite", // sqlite or mysql
"MySQL_IP": "",
"MySQL_Port": "",
"MySQL_User": "",
"MySQL_Password": "",
"MySQL_Database": "",
"MySQL_Table": "playermodelchanger",
"ConfigVersion": 1
}
See Wiki
If you already find a workshop item which contains the models you need, you can skip this part
Requirements:
- Your own model
- Counter-Strike 2 Workshop Tools (which can be installed in
Steam -> cs2 -> properties -> DLC
)
Step 1. Open your cs2 directory, find game/csgo/gameinfo.gi
,
go to the end of the file, find AddonConfig -> VpkDirectories
. Then add the directory you want to put in the vpk like the following example:
example:
AddonConfig
{
"VpkDirectories"
{
"exclude" "maps/content_examples"
"include" "maps"
"include" "characters" // this is the directory you want to add to the vpk
"include" "cfg/maps"
"include" "materials"
"include" "models"
"include" "panorama/images/overheadmaps"
"include" "panorama/images/map_icons"
"include" "particles"
"include" "resource/overviews"
"include" "scripts/vscripts"
"include" "sounds"
"include" "soundevents"
"include" "lighting/postprocessing"
"include" "postprocess"
"include" "addoninfo.txt"
}
"AllowAddonDownload" "1"
"AllowAddonDownloadForDemos" "1"
"DisableAddonValidationForDemos" "1"
}
Step 2. Launch Counter-Strike 2 Workshop Tools
, then click Create New Addon
Step 3. Go to folder ./game/csgo_addons/<your addon name>/
and paste your characters folder to here.
Step 4. Open Asset Browser
, then click the Tools
button on the top-right corner, open Counter-Strike 2 Workshop Manager
Step 5. Click New
button in the Counter-Strike 2 Workshop Manager
, fill in all the information, and publish it.
Step 6. After verification, you should be able to use the workshop item.
add your workshop id to this plugin, follow MultiAddonManager
See the Configuration
- You should use the compiled model (suffix
.vmdl_c
) - You should use
.vmdl
instead of.vmdl_c
in config json
- Method to change model: DefaultSkins by ChallengerMode
- Translation
To build this plugin, run dotnet build
.
Feel free to create Pull Requests or issues.