View Single Post
Author Message
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 07-05-2011 , 06:23   [CS] Player Models API 1.2
Reply With Quote #1

[CS] Player Models API


This is basically an API intended to replace <cstrike> player model changing natives, based off my previous tutorial ([TUT-CS] Changing player models and lowering svc_bad). I did this mainly for scripters that don't really care about the specifics, and just want something that works out of the box.

Details:
  • Allows easily setting and restoring custom player models in CS and CZ (models last until player disconnects or are manually reset)
  • Built-in SVC_BAD prevention
  • Support for custom hitboxes (model index offset setting)
  • You still need to precache player models in your plugin!
Natives:
Code:
/**  * Sets a custom player model.  *  * @param id            Player index.  * @param model   Custom model's short name.  */ native cs_set_player_model(id, const model[]) /**  * Restores CS default model for player.  *  * @param id        Player index.  */ native cs_reset_player_model(id)
Usage:

Download files below into your scripting folder, then do: #include <cs_player_models_api> in your plugin to be able to use the natives.
Attached Files
File Type: inc cs_player_models_api.inc (575 Bytes, 7137 views)
File Type: sma Get Plugin or Get Source (cs_player_models_api.sma - 10875 views - 6.3 KB)
__________________

Last edited by MeRcyLeZZ; 08-06-2011 at 22:15. Reason: v1.2: Fixed server crash when resetting lots of player models at once
MeRcyLeZZ is offline