Advertisement
CheezPuff

Change Model Players [Fixed 2019]

May 31st, 2017
485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.98 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <cstrike>
  5. #include <hamsandwich>
  6.  
  7. #define PLUGIN "Player Models"
  8. #define VERSION "1.0b"
  9. #define AUTHOR "CheezPuff"
  10.  
  11. // make sure that folder you set and nothing  big letter or small
  12. new const g_szModelsCT[ ] = "models/player/CTSkin/CTSkin.mdl"; // Counte-Terrorists Model
  13. new const g_szModelsT[ ] = "models/player/TSkin/TSkin.mdl"; // Terrorists Model
  14.  
  15. public plugin_init() {
  16.     register_plugin(PLUGIN, VERSION, AUTHOR)
  17.     RegisterHam(Ham_Spawn, "player", "fw_spawn", 1);
  18. }
  19.  
  20. public plugin_precache()
  21. {
  22.     precache_model( g_szModelsCT );
  23.     precache_model( g_szModelsT );
  24. }
  25.  
  26. public fw_spawn( Index )
  27. {
  28.     if( !is_user_alive( Index ) || is_user_bot( Index ) )
  29.         return;
  30.    
  31.     if( cs_get_user_team( Index ) == CS_TEAM_CT )
  32.     {
  33.         cs_set_user_model( Index, "CTSkin" ); // "AddYourFolderSkin"
  34.     }
  35.    
  36.     else if( cs_get_user_team( Index ) == CS_TEAM_T )
  37.     {
  38.         cs_set_user_model( Index, "TSkin" ); //"AddYourFolderSkin"
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement