#include #include #include #define ACCESS ADMIN_KICK #define MAX_ADMIN_MODELS 1 #define MAX_USER_MODELS 5 new g_iUserModel[33] new g_szAdminModels[MAX_ADMIN_MODELS][2][] = { {"models/player/hhxtadmin/hhxtadmin.mdl","models/player/hhxctadmin/hhxctadmin.mdl"} } new g_szPlayerModels[MAX_USER_MODELS][10][] = { {"models/player/hhxterror/hhxterror.mdl","models/player/hhxurban/hhxurban.mdl"}, {"models/player/hhxelite/hhxelite.mdl","models/player/hhxgsg9/hhxgsg9.mdl"}, {"models/player/hhxarctic/hhxarctic.mdl","models/player/hhxsas/hhxsas.mdl"}, {"models/player/hhxguerilla/hhxguerilla.mdl","models/player/hhxgign/hhxgign.mdl"}, {"models/player/hhxmilitia/hhxmilitia.mdl","models/player/hhxspetsnaz/hhxspetsnaz.mdl"} } public plugin_init() { register_plugin("amx_playermodels","1.0","Hawk552 & Gh0s7 ChiLd") register_event("ResetHUD","fnEventResetHUD","be") } public plugin_precache() { new iCount; for(iCount = 0;iCount < MAX_ADMIN_MODELS;iCount++) { precache_model(g_szAdminModels[iCount][0]) precache_model(g_szAdminModels[iCount][1]) } for(iCount = 0;iCount < MAX_USER_MODELS;iCount++) { precache_model(g_szPlayerModels[iCount][0]) precache_model(g_szPlayerModels[iCount][1]) } } public client_putinserver(id) g_iUserModel[id] = random_num(0 , (is_user_admin(id)? MAX_ADMIN_MODELS : MAX_USER_MODELS)) public fnEventResetHUD(id) if(get_user_flags(id) & ACCESS) cs_set_user_model(id,g_szAdminModels[g_iUserModel[id]][get_user_team(id) - 1]) else cs_set_user_model(id,g_szPlayerModels[g_iUserModel[id]][get_user_team(id) - 1])