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
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <colorchat>
#include <kiriman>
#define PLUGIN "Model Changer"
#define VERSION "1.0"
#define AUTHOR "KiQDominaN | kiriman"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("change_model", "ChangeModel", ADMIN_KICK, "")
add_menu()
set_task(1.0, "CheckTeam", 0, _, _, "b", _)
}
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/mummy/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Банан", "cheater_ct_new", 0, mcbTEST)
menu_additem(i_Menu, "\wСосиска", "cheater_t_new", 0, mcbTEST)
menu_additem(i_Menu, "\dТелочка", "SUNOL", 0, mcbTEST)
menu_additem(i_Menu, "\dМумия", "mummy", 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 && cs_get_user_team(id) == CS_TEAM_T)
return ITEM_DISABLED
if(item == 1 && cs_get_user_team(id) == CS_TEAM_CT)
return ITEM_DISABLED
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 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)
}
return PLUGIN_HANDLED
}
public CheckTeam(id) {
new player, players[32], count
new model[48]
get_players(players, count, "ah")
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
}