Advertisement
mforce

Player Models

Sep 22nd, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.95 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <cstrike>
  4.  
  5. #define PLUGIN "Player Models"
  6. #define VERSION "1.0"
  7. #define AUTHOR "unknown"
  8.  
  9. public plugin_init() {
  10.     register_plugin(PLUGIN, VERSION, AUTHOR)
  11.     RegisterHam(Ham_Spawn, "player", "spawn_event", 1)
  12. }
  13.  
  14. new const modellek[][] = {
  15.     "models/player/tmodell/tmodell.mdl",
  16.     "models/player/ctmodell/ctmodell.mdl"
  17. }
  18.  
  19. public plugin_precache() {
  20.     for(new i; i<sizeof(modellek);i++) precache_model(modellek[i]);
  21. }
  22.  
  23. public spawn_event(id) {
  24.     if(!is_user_alive(id)) return HAM_IGNORED;
  25.     static team
  26.     team = get_user_team(id)
  27.     switch(team) {
  28.         case 1: {
  29.             if(get_user_flags(id) & ADMIN_BAN) cs_set_user_model(id, "tmodell");
  30.             //else if((get_user_flags(id) & ADMIN_LEVEL_H) cs_set_user_model(id, "ctvip");
  31.         }
  32.         case 2: {
  33.             if(get_user_flags(id) & ADMIN_BAN) cs_set_user_model(id, "ctmodell");
  34.             //else if((get_user_flags(id) & ADMIN_LEVEL_H) cs_set_user_model(id, "tevip");
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement