CS2-PlayerModelChanger
CS2-PlayerModelChanger copied to clipboard
A lightweighted counterstrikesharp plugin to change player model.
CS2-PlayerModelChanger
A lightweighted counterstrikesharp plugin to change player model.
If you like this plugin, please give a star :)
This plugin can cause a GSLT ban, please use at your own risk.
- Before you use
- Feature
- Installation Guide
- Optional Dependencies
- Commands
- Configuration
- Common Issues
- Credits
- TODOs
- Contribution
- How to add default or workshop model
Custom model parts:
- How to pack a model into steam workshop item
Before you use
- this plugin can cause a GSLT ban, use at your own risk
Feature
- a model select menu (support wasd menu)
- can set different model for T and CT
- random model
- update model after change instantly
- thirdperson inspection
- can set default model
- can provide special models for specified permission or player
- can disable the display of leg model
Installation Guide
Download the plugin from latest Release, then put it into your counterstrikesharp plugin folder.
Optional Dependencies
- MultiAddonManager (for workshop model)
- WASDMenuAPI (for wasd interactive menu)
Commands
Server side
pmc_enable [true/false]Enable / Disable the pluginpmc_resynccacheResync cache.
Client side
!modelshow 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 <all/ct/t> / !models <all/ct/t>select model
Admin (Need @pmc/admin flag or #pmc/admin group)
!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] checkCheck if player's model is not allowed to have, if not then reset it.!modeladmin reloadReload the config.
Configuration
When you install the plugin successfully, it will generate counterstrikesharp/configs/plugins/PlayerModelChanger/PlayerModelChanger.json.
See Wiki to config it.
How to add default or workshop model
Find the model path
Use Source2Viewer or GCFScape to open the workshop vpk (or pak01 vpk), then find the .vmdl_c file, copy the path out
the path should be like this: characters/.../xxx.vmdl (if it is in characters folder)
Important: replace .vmdl_c in the path with .vmdl
Setup MultiAddonManager ( for workshop model )
add your workshop id to this plugin, follow MultiAddonManager after added, switch the map once to make multiaddonmanager download the addon
Config PlayerModelChanger
See the Configuration
Common Issues
- You should use the compiled model (suffix
.vmdl_c) - You should use
.vmdlinstead of.vmdl_cin config json - If your model don't have animation, try to switch the map once (to make multiaddonmanager download the model)
Credits
- Method to change model: DefaultSkins by ChallengerMode
- Thirdperson inspection code: ThirdPerson-WIP by UgurhanK
TODOs
- Translation
Contribution
To build this plugin, run build.bat.
Feel free to create Pull Requests or issues.
How to pack a model into steam workshop item
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.