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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <colorchat>
#include <kiriman>
#include <fun>
#define PLUGIN "Character Changer"
#define VERSION "1.0"
#define AUTHOR "KiQDominaN | kiriman"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_concmd("change_model", "ChangeModel", ADMIN_KICK, "");
register_logevent("startNewRound", 2, "1=Round_Start");
register_logevent("CheckTeam",3,"1=joined team")
add_menu();
}
public plugin_precache() {
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/SUNOL/SUNOL.mdl");
precache_model("models/player/liper/liper.mdl");
}
public add_menu() {
AddMenuItem("Сменить персонажа", "change_model", ADMIN_KICK, PLUGIN);
}
public mcb_Menu(id, menu, item){
if(item == 2 || item == 3) {
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 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);
ChangeBanana(id, s_Name, s_Data);
menu_destroy(menu);
}
return PLUGIN_HANDLED;
}
public ChangeModel(id) {
new i_Menu = menu_create("\rСменить персонажа", "menu_handler");
new mcbTEST = menu_makecallback("mcb_Menu");
if(cs_get_user_team(id) == CS_TEAM_CT)
menu_additem(i_Menu, "\wБанан", "cheater_ct_new", 0, mcbTEST);
else
menu_additem(i_Menu, "\wСосиска", "cheater_t_new", 0, mcbTEST);
menu_additem(i_Menu, "\dТелочка", "SUNOL", 0, mcbTEST);
menu_additem(i_Menu, "\dПризрак", "liper", 0, mcbTEST);
menu_setprop(i_Menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, i_Menu, 0);
}
public ChangeBanana(id, s_Name[], s_Data[]) {
new model[48];
cs_get_user_model(id, model, 48);
if (strcmp(model, s_Data, 0) == 0) {
cs_reset_user_model(id);
ColorChat(id,RED,"Модель восстановлена!");
}
else {
cs_set_user_model(id, s_Data);
replace(s_Name, 48, "\y", "");
replace(s_Name, 48, "\w", "");
replace(s_Name, 48, "\r", "");
replace(s_Name, 48, "\d", "");
new message[48];
format(message, 48, "Вы %s!", s_Name);
ColorChat(id, GREEN, message);
}
GhostMode(id);
return PLUGIN_HANDLED
}
public GhostMode(id) {
new model[48];
cs_get_user_model(id, model, 48);
if (strcmp(model, "liper", 0) == 0) {
set_user_footsteps(id, 1);
set_user_rendering(id, kRenderFxHologram, 0, 0, 0, kRenderTransAlpha, 35);
set_user_noclip(id, 1);
}
else {
set_user_footsteps(id, 0);
set_user_rendering(id, kRenderNormal, 0, 0, 0, kRenderFxNone, 255);
set_user_noclip(id, 0);
}
}
public startNewRound() {
new player, players[32], count;
new model[48];
get_players(players, count, "h");
for (new i = 0; i < count; i++) {
player = players[i];
cs_get_user_model(player, model, 48);
if (strcmp(model, "liper", 0) == 0) {
set_user_footsteps(player, 1);
set_user_rendering(player, kRenderFxHologram, 0, 0, 0, kRenderTransAlpha, 35);
set_user_noclip(player, 1);
}
else {
set_user_footsteps(player, 0);
set_user_rendering(player, kRenderNormal, 0, 0, 0, kRenderFxNone, 255);
set_user_noclip(player, 0);
}
}
return PLUGIN_HANDLED;
}
public CheckTeam() {
new player, players[32], count;
new model[48];
get_players(players, count, "h");
for (new i = 0; i < count; i++) {
player = players[i];
cs_get_user_model(player, model, 48);
switch (cs_get_user_team(player)) {
case CS_TEAM_T:
//Change fucking player model
if (strcmp(model, "cheater_ct_new", 0) == 0) cs_set_user_model(player, "cheater_t_new");
case CS_TEAM_CT:
//Change fucking player model
if (strcmp(model, "cheater_t_new", 0) == 0) cs_set_user_model(player, "cheater_ct_new");
}
}
return PLUGIN_HANDLED;
}