include amxmodx include amxmisc include cstrike include colorchat incl

  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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <colorchat>
#include <kiriman>
#define PLUGIN "BananaMode"
#define VERSION "1.0"
#define AUTHOR "KiQDominaN | kiriman"
new NumberItem = 1
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("change_model", "ChangeModel", ADMIN_KICK, "")
set_task(1.0, "CheckTeam", 0, _, _, "b", _)
add_menu()
}
public plugin_precache() {
precache_model("models/player/gign/gign.mdl")
precache_model("models/player/leet/leet.mdl")
precache_model("models/player/cheater_ct_new/cheater_ct_new.mdl")
precache_model("models/player/cheater_t_new/cheater_t_new.mdl")
precache_model("models/player/mummy.mdl")
}
public add_menu() {
AddMenuItem("Сменить модель", "change_model", ADMIN_KICK, PLUGIN)
}
public ChangeModel(id) {
new i_Menu = menu_create("\rСменить модель", "menu_handler")
new mcbTEST = menu_makecallback("mcb_Menu")
menu_additem(i_Menu, "\wБанан | Сосиска", "1", 0, mcbTEST)
menu_additem(i_Menu, "\dМумия", "2", 0, mcbTEST)
menu_setprop(i_Menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, i_Menu, 0)
}
public mcb_Menu(id, menu, item){
getNumberItem(menu, item)
if(NumberItem == 2) {
new player_name[32]
get_user_name(id, player_name, 31)
if(is_Ogurec("addons/amxmodx/configs/model_plugin.ini", player_name) == 0) {
return ITEM_DISABLED
}
}
return ITEM_ENABLED
}
public getNumberItem(menu, item) {
new s_Data[6], 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)
NumberItem = str_to_num(s_Data)
}
public menu_handler(id, menu, item) {
if (item == MENU_EXIT) {
menu_destroy(menu)
} else {
getNumberItem(menu, item)
ChangeBanana(id)
menu_destroy(menu)
}
return PLUGIN_HANDLED
}
public ChangeBanana(id) {
new model[48]
cs_get_user_model(id, model, 48)
if(NumberItem == 1) {
switch (cs_get_user_team(id)) {
case CS_TEAM_T:
{
if (strcmp(model, "cheater_t_new", 0) == 0) {
cs_set_user_model(id, "leet")
ColorChat(id,RED,"Режим сосиски выключен!")
}
else {
cs_set_user_model(id, "cheater_t_new")
ColorChat(id, RED, "Вы сосиска!")
}
}
case CS_TEAM_CT:
{
if (strcmp(model, "cheater_ct_new", 0) == 0) {
cs_set_user_model(id, "gign")
ColorChat(id,RED,"Режим банана выключен!")
}
else {
cs_set_user_model(id, "cheater_ct_new")
ColorChat(id, RED, "Вы банан!")
}
}
}
} else {
// Мумия !!!
if (strcmp(model, "mummy", 0) == 0) {
switch (cs_get_user_team(id)) {
case CS_TEAM_T:
{
cs_set_user_model(id, "leet")
}
case CS_TEAM_CT:
{
cs_set_user_model(id, "gign")
}
}
ColorChat(id,RED,"Режим мумии выключен!")
} else {
cs_set_user_model(id, "mummy")
ColorChat(id, RED, "Вы мумия!")
}
}
return PLUGIN_HANDLED
}
public CheckTeam(id) {
new player, players[32], count
new model[48]
get_players(players, count, "h")
for (new i = 0; i < count; i++) {
player = players[i]
switch (cs_get_user_team(player)) {
case CS_TEAM_T:
{
//Change fucking player model
cs_get_user_model(player, model, 48)
if (strcmp(model, "cheater_ct_new", 0) == 0) cs_set_user_model(player, "cheater_t_new")
}
case CS_TEAM_CT:
{
//Change fucking player model
cs_get_user_model(player, model, 48)
if (strcmp(model, "cheater_t_new", 0) == 0) cs_set_user_model(player, "cheater_ct_new")
}
}
}
return PLUGIN_HANDLED
}