Advertisement
IdoGame

Team Models

Sep 2nd, 2014
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include < cstrike >
  6. #include < hamsandwich >
  7.  
  8.  
  9. #define PLUGIN "Player skins"
  10. #define VERSION "v1.0"
  11. #define AUTHOR "xflane"
  12.  
  13. new const CtMdl[ ] = "models/player/Ct-Model/Ct-Model.mdl";
  14. new const tMdl[ ] = "models/player/T-Model/T-Model.mdl";
  15.  
  16. public plugin_init() {
  17. register_plugin(PLUGIN, VERSION, AUTHOR)
  18. RegisterHam( Ham_Spawn, "player", "FwdPlayerSpawn_Post", 1 );
  19.  
  20. }
  21. public plugin_precache()
  22. {
  23. precache_model( CtMdl );
  24. precache_model( tMdl );
  25. }
  26. public FwdPlayerSpawn_Post( client )
  27. {
  28.  
  29. if ( !is_user_alive( client ) )
  30. return 1;
  31. switch(cs_get_user_team(client)){
  32. case CS_TEAM_CT: cs_set_user_model( client, "Ct-Model");
  33. case CS_TEAM_T: cs_set_user_model( client, "T-Model");
  34.  
  35.  
  36. }
  37. return 1;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement