Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <fun>
- #include <cstrike>
- #include <engine>
- #include <fakemeta>
- #include <hamsandwich>
- #include <dhudmessage>
- #include < colorchat >
- #define PLUGINAME "vipmenu"
- #define VIP_FLAG ADMIN_LEVEL_H
- new cmd_name[32]
- new Glow[33]
- public plugin_init()
- {
- register_plugin("vipmenu", "1.0", "Lucomorie")
- register_clcmd("vipmenu", "vipmenu_new")
- register_clcmd("say /vipmenu", "vipmenu_new")
- RegisterHam(Ham_Spawn, "player", "event_PlayerSpawn_post",1)
- }
- public event_PlayerSpawn_post(id)
- {
- if(is_user_connected(id) && is_user_alive(id))
- {
- Glow[id] = false
- }
- }
- public vipmenu_new(id)
- {
- if(get_user_flags(id) & ADMIN_LEVEL_H)
- {
- new new_menu = menu_create("\yAdvanced VipMenu:", "menu_admin")
- menu_additem(new_menu,"\rОружейка", "1")
- menu_additem(new_menu,"Кикнуть", "2")
- menu_additem(new_menu,"Сменить карту \d(голосование)", "3")
- if(Glow[id])
- {
- menu_additem(new_menu,"Рандомное свечение: \rВкл", "4")
- }
- else
- {
- menu_additem(new_menu,"Рандомное свечение: \rВыкл", "4")
- }
- menu_additem(new_menu,"Рестарт раунда", "5")
- menu_setprop(new_menu, MPROP_EXITNAME, "Выход");
- menu_display(id, new_menu, 0)
- }
- else
- {
- get_user_name(id, cmd_name, 31)
- ColorChat(id, NORMAL, "^1Недостаточно власти", cmd_name)
- }
- }
- public menu_admin( id, menu, item, iEnt, player)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(menu)
- return PLUGIN_HANDLED
- }
- new data[6], iName[64]
- new access, callback
- menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
- new key = str_to_num(data)
- switch( key )
- {
- case 1: client_cmd(id, "vipweaponmenu")
- case 2: client_cmd(id, "amx_kickmenu")
- case 3: client_cmd(id, "amx_votemapmenu")
- case 4:
- {
- if(is_user_alive(id))
- {
- if(!Glow[id])
- {
- set_user_rendering(id, kRenderFxGlowShell, random_num(1, 254), random_num(2, 253), random_num(3, 252))
- ColorChat(id, RED, "^1Рандомное свечение ^4включено")
- Glow[id] = true
- }
- else
- {
- set_user_rendering(id);
- ColorChat(id, RED, "^1Рандомное свечение ^3выключено")
- Glow[id] = false
- }
- vipmenu_new(id)
- }
- else
- {
- return PLUGIN_CONTINUE
- }
- }
- case 5:
- {
- get_user_name(id, cmd_name, 31)
- ColorChat(0, NORMAL, "^4%s ^1сделал(а) рестарт", cmd_name)
- server_cmd("sv_restartround 1");
- }
- }
- menu_destroy(menu)
- return PLUGIN_HANDLED
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement