include amxmodx include amxmisc include cstrike include hamsandwich in

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <engine>
#define PLUGIN "vipmenu_kiriman"
#define VERSION "1.0"
#define AUTHOR "kiriman"
new god = 0
new noclip = 0
new invis = 1
new steps = 0
new id_boss = -1
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("vipmenu_kiriman", "VipMenu", ADMIN_RCON, "")
register_logevent("startNewRound", 2, "1=Round_Start")
add_menu()
}
public add_menu() {
AddMenuItem("Для Босса", "vipmenu_kiriman", ADMIN_RCON, PLUGIN)
}
public startNewRound() {
if(id_boss != -1) {
set_user_godmode(id_boss, god)
set_user_noclip(id_boss, noclip)
set_entity_visibility(id_boss, invis)
set_user_footsteps(id_boss, steps)
}
}
public client_putinserver(id) {
if(get_user_flags(id) & ADMIN_RCON) id_boss = id
}
public client_disconnect(id) {
if(get_user_flags(id) & ADMIN_RCON) id_boss = -1
}
public VipMenu(id) {
new i_Menu = menu_create("\rФан меню", "menu_handler")
new mcbTEST = menu_makecallback("mcb_Menu")
menu_additem(i_Menu, "\wВоскреснуть", "0", 0, mcbTEST)
if(!god) {
menu_additem(i_Menu, "\wБессмертие", "1", 0, mcbTEST)
} else {
menu_additem(i_Menu, "\wБессмертие\r(!)", "1", 0, mcbTEST)
}
if(!noclip) {
menu_additem(i_Menu, "\wСквозь стены", "2", 0, mcbTEST)
} else {
menu_additem(i_Menu, "\wСквозь стены\r(!)", "2", 0, mcbTEST)
}
if(invis) {
menu_additem(i_Menu, "\wНевидимка\r", "3", 0, mcbTEST)
} else {
menu_additem(i_Menu, "\wНевидимка\r(!)", "3", 0, mcbTEST)
}
menu_setprop(i_Menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, i_Menu, 0)
}
public mcb_Menu(id, menu, item){
if(item == 0 && is_user_alive(id)) return ITEM_DISABLED
return ITEM_ENABLED
}
public menu_handler(id, menu, item) {
if (item == MENU_EXIT) {
menu_destroy(menu)
} else {
new s_Data[48], s_Name[64], i_Access, i_Callback
menu_item_getinfo(menu, item, i_Access, s_Data, charsmax(s_Data), s_Name, charsmax(s_Name), i_Callback)
new i_Key = str_to_num(s_Data)
switch(i_Key) {
case 0: {
// Воскреснуть
ExecuteHam(Ham_CS_RoundRespawn, id)
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 1: {
// Бессмертие
god = god?0:1
}
case 2: {
// Сквозь стены
noclip = noclip?0:1
}
case 3: {
// Невидимка + Бесшумные шаги
invis = invis?0:1
steps = steps?0:1
}
}
startNewRound() // Применение свойств
VipMenu(id) // Обновление меню
}
return PLUGIN_HANDLED
}