HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /*##########################################################################
  2. ##
  3. ## -- www.SteamTools.net
  4. ## ___ _____ ___ ___ _ __ _ ___ ___ _____ _
  5. ## / | | _ \ / |/ | | | | \ | | / |/ | | _ \ | |
  6. ## / /| | | | | | / /| /| | | | | \| | / /| /| | | | | | | |
  7. ## / / | | | | | | / / |__/ | | | | | |\ | / / |__/ | | | | | | | |
  8. ## / / | | | |_| | / / | | | | | | \ | / / | | | |_| | | |___
  9. ## /_/ |_| |_____/ /_/ |_| |_| |_| \_| /_/ |_| |_____/ |_____|
  10. ##
  11. ## |__ |__ o _|_ ___ __ __ o |__, ___
  12. ## -- |__) (__| (__(__( | ) | |_, (__/_ | ) ) | | \ (__/_
  13. ## |
  14. ##
  15. ## Originated as a simple idea back in 2004, it was forgotten due to
  16. ## lack of my 'Small' coding skills. However I have progressed in recent
  17. ## months and somehow crossed that old post with this concept in it. So
  18. ## naturally I challenged myself to see if I could do it, and voila! I
  19. ## could :)
  20. ##
  21. ## Once you join, you play a normal person for the first round, and for
  22. ## all remaining rounds your CT or TE models are custom. They now read
  23. ## "ADMIN" on front and back, and also have small "A" patches on the arms.
  24. ## I designed these models myself, it's very easy, just bring the textures
  25. ## into photoshop, tweak out, and replace.
  26. ##
  27. ## Enjoy!
  28. ##
  29. ##
  30. ## CHANGELOG
  31. ##------------------------------------------------------------------------
  32. ## 2) v1.1.1 - Fixed missing event
  33. ## 1) v1.1.0 - Fixed VIP and other model bugs
  34. ##
  35. ##
  36. ## INSTALLATION
  37. ##------------------------------------------------------------------------
  38. ## 1) Unzip (which you may have done already)
  39. ## 2) Place 'amx_adminmodel.amxx' in 'cstrike/addons/amxmodx/plugins'
  40. ## 3) Add a line in 'configs/plugins.ini' containing 'amx_adminmodel.amxx'
  41. ## 4) Put the 'admin_ct' and 'admin_te' folders into 'cstrike/models' folder
  42. ## 5) -- Visit www.SteamTools.net and enjoy your new plugin!
  43. ##
  44. ##
  45. ##
  46. ## THE CVARs
  47. ##------------------------------------------------------------------------
  48. ##
  49. ## No CVARs for this plugin :)
  50. ##
  51. ##
  52. ##########################################################################*/
  53.  
  54.  
  55. #include <amxmodx>
  56. #include <amxmisc>
  57. #include <cstrike>
  58.  
  59. public plugin_init() {
  60. register_plugin("AMX Admin Model", "1.1.1", "whitemike")
  61. register_event("ResetHUD", "resetModel", "b")
  62. return PLUGIN_CONTINUE
  63. }
  64.  
  65. public plugin_precache() {
  66. precache_model("models/player/admin_ct/admin_ct.mdl")
  67. precache_model("models/player/admin_te/admin_te.mdl")
  68.  
  69. return PLUGIN_CONTINUE
  70. }
  71.  
  72. public resetModel(id, level, cid) {
  73. if (get_user_flags(id) & ADMIN_KICK) {
  74. new CsTeams:userTeam = cs_get_user_team(id)
  75. if (userTeam == CS_TEAM_T) {
  76. cs_set_user_model(id, "admin_te")
  77. }
  78. else if(userTeam == CS_TEAM_CT) {
  79. cs_set_user_model(id, "admin_ct")
  80. }
  81. else {
  82. cs_reset_user_model(id)
  83. }
  84. }
  85.  
  86. return PLUGIN_CONTINUE
  87. }
  88.