всем привет ребятки. ))) Помогите мне сделать флаг доступа на этом плагине на q тожль ADMIN_LEVEL_E если не ошибаюсь... Сам делаю не выходит я хз что такое! #include <amxmodx> #include <amxmisc> #include <cstrike> public plugin_init() { register_plugin("AMX VIP Model", "1.0", "Starik") register_event("ResetHUD", "resetModel", "b") return PLUGIN_CONTINUE } public plugin_precache() { precache_model("models/player/vip_ct/vip_ct.mdl") precache_model("models/player/vip_te/vip_te.mdl") return PLUGIN_CONTINUE } public resetModel(id, level, cid) { if (get_user_flags(id) & ADMIN_LEVEL_H) { new CsTeams:userTeam = cs_get_user_team(id) if (userTeam == CS_TEAM_T) { cs_set_user_model(id, "vip_te") } else if(userTeam == CS_TEAM_CT) { cs_set_user_model(id, "vip_ct") } else { cs_reset_user_model(id) } } return PLUGIN_CONTINUE }
ADMIN_IMMUNITY (a) ADMIN_RESERVATION (b) ADMIN_KICK ( с ) ADMIN_BAN (d) ADMIN_SLAY (e) ADMIN_MAP (f) ADMIN_CVAR (g) ADMIN_CFG (h) ADMIN_CHAT (i) ADMIN_VOTE (j) ADMIN_PASSWORD (k) ADMIN_RCON (l) ADMIN_LEVEL_A (m) ADMIN_LEVEL_B (n) ADMIN_LEVEL_C (o) ADMIN_LEVEL_D (p) ADMIN_LEVEL_E (q) ADMIN_LEVEL_F ( r ) ADMIN_LEVEL_G (s) ADMIN_LEVEL_H (t) ADMIN_MENU (u) ADMIN_ADMIN (y) ADMIN_USER (z)
#include <amxmodx> #include <amxmisc> #include <engine> #define ADMINACCESS ADMIN_BAN new jumpnum[33] = 0 new bool:dojump[33] = false public plugin_init() { register_plugin("admin_jump","1.1","AUTHOR") register_cvar("amx_maxjumps","1") register_cvar("amx_mjadminonly","1") } public client_putinserver(id) { jumpnum[id] = 0 dojump[id] = false } public client_disconnect(id) { jumpnum[id] = 0 dojump[id] = false } public client_PreThink(id) { if(!is_user_alive(id)) return PLUGIN_CONTINUE if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE new nbut = get_user_button(id) new obut = get_user_oldbutton(id) if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP)) { if(jumpnum[id] < get_cvar_num("amx_maxjumps")) { dojump[id] = true jumpnum[id]++ return PLUGIN_CONTINUE } } if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND)) { jumpnum[id] = 0 return PLUGIN_CONTINUE } return PLUGIN_CONTINUE } public client_PostThink(id) { if(!is_user_alive(id)) return PLUGIN_CONTINUE if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE if(dojump[id] == true) { new Float:velocity[3] entity_get_vector(id,EV_VEC_velocity,velocity) velocity[2] = random_float(265.0,285.0) entity_set_vector(id,EV_VEC_velocity,velocity) dojump[id] = false return PLUGIN_CONTINUE } return PLUGIN_CONTINUE } Изменить на флаг q нужно ребят, тут я пишу ADMIN_LEVEL_E выдает ошибку компиляции