Здравствуйте у меня возникла проблема с открытием окна випменю для оружия !!!В начале раунда даёт , бронь , гранаты , а вот открыть панель оружия не могу !!! Может кто подскажет что за проблема ?!
Код
#define DAMAGE_RECIEVED
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#define VIP_FLAG ADMIN_LEVEL_H
new a
new round_number
public plugin_init()
{
register_plugin("VIP Privileges", "1.1", "Kent-4");
register_event("ResetHUD", "ResetHUD", "be");
register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
register_clcmd("say /adminka", "adminka");
register_clcmd("say /vip","ShowMotd");
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4
register_menucmd(register_menuid("Which Weapon?"), keys, "giveWeapon");
register_clcmd("say /vipmenu", "showWeaponMenu");
}
public showWeaponMenu(id)
{
new menu[192]
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4
format(menu, 191, "Which Weapon?^n^n1. AK47^n2. M4A1^n3. AWP^n4. DEAGLE")
show_menu(id, keys, menu)
return PLUGIN_HANDLED
}
public giveWeapon(id, key)
{
if ( ! ( get_user_flags ( id ) & VIP_FLAG ) )
{
ChatColor ( id , "!g[SERVER]!y ТОЛЬКО ДЛЯ !team[VIP] !y!" );
return PLUGIN_HANDLED;
}
if ( ! is_user_alive ( id ) )
{
ChatColor(id, "!g[SERVER]!y You!team [Dead] !y!");
return PLUGIN_HANDLED;
}
if (a > 1 )
{
ChatColor(id, "!g[SERVER]!y НЕЛЬЗЯ ВЗЯТЬ!team [БОЛЬШЕ] !y!");
return PLUGIN_HANDLED;
}
if ( round_number <= 3 )
{
ChatColor ( id , "!g[SERVER]!y Доступно со 2 раунда !y!" );
return PLUGIN_HANDLED;
}
if (key == 0)
{
give_item(id, "weapon_ak47")
cs_set_user_bpammo( id , CSW_AK47, 90 )
a++
} else if (key == 1) {
give_item(id, "weapon_m4a1")
cs_set_user_bpammo( id , CSW_M4A1, 90 )
a++
} else if (key == 2) {
give_item(id, "weapon_awp")
cs_set_user_bpammo( id , CSW_AWP, 30 )
a++
} else if (key == 3) {
give_item(id, "weapon_deagle")
cs_set_user_bpammo( id , CSW_DEAGLE, 90 )
}
}
public adminka(id)
{
show_motd(id, "adminka.txt")
}
public PrintText(id)
{
client_print(id, print_chat, "Введите /adminka или /vip чтоб получить информацию как получить админ права или VIP привелегии!")
}
public ResetHUD(id)
{
set_task(0.5, "VIP", id + 6910)
}
public VIP(TaskID)
{
new id = TaskID - 6910
if ( get_user_flags ( id ) & VIP_FLAG )
{
message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
write_byte(id)
write_byte(4)
message_end()
give_item(id,"weapon_hegrenade")
give_item(id,"weapon_flashbang")
give_item(id,"weapon_flashbang")
give_item(id,"weapon_smokegrenade")
give_item(id,"item_assaultsuit")
}
return PLUGIN_HANDLED
}
public ShowMotd(id)
{
show_motd(id, "vip.txt")
}
public event_round_start ( )
{
round_number++
a--
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!y", "^1") // Default Color
replace_all(msg, 190, "!team", "^3") // Team Color
replace_all(msg, 190, "!team2", "^0") // Team2 Color
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Код
csf_opengl32.amxx
csf_anticheat.amxx
rcon_defencer.amxx
amxbans_main.amxx
amxbans_core.amxx
amxbans_ssban.amxx
; AMX Mod X plugins
; Admin Base - Always one has to be activated
;admin.amxx ; admin base (required for any admin-related)
;admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; Basic
admincmd.amxx ; basic admin console commands
;adminhelp.amxx ; help command for admin console commands
;adminslots.amxx ; slot reservation
multilingual.amxx; Multi-Lingual management
; Menus
menufront.amxx ; front-end for admin menus
cmdmenu.amxx ; command menu (speech, settings)
plmenu.amxx ; players menu (kick, ban, client cmds.)
;telemenu.amxx ; teleport menu (Fun Module required!)
mapsmenu.amxx ; maps menu (vote, changelevel)
pluginmenu.amxx ; Menus for commands/cvars organized by plugin
; Chat / Messages
adminchat.amxx ; console chat commands
antiflood.amxx ; prevent clients from chat-flooding the server
scrollmsg.amxx ; displays a scrolling message
imessage.amxx ; displays information messages
adminvote.amxx ; vote commands
; Map related
nextmap.amxx ; displays next map in mapcycle
mapchooser.amxx
;deagsmapmanager.amxx; allows to vote for next map
timeleft.amxx ; displays time left on map
; Configuration
pausecfg.amxx ; allows to pause and unpause some plugins
statscfg.amxx ; allows to manage stats plugins via menu and commands
; Counter-Strike
restmenu.amxx ; restrict weapons menu
statsx_shell.amxx; stats on death or round end (CSX Module required!)
miscstats.amxx ; bunch of events announcement for Counter-Strike
stats_logging.amxx; weapons stats logging (CSX Module required!)
sistem.amxx
; Enable to use AMX Mod plugins
;amxmod_compat.amxx; AMX Mod backwards compatibility layer
; Custom - Add 3rd party plugins here
swear_replacement.amxx
resetscore.amxx
admin_spec_esp.amxx
bcd_hudvoice_timer.amxx
admin_check.amxx
knife_duel.amxx
info_rank.amxx
sem.amxx
amotd.amxx
chat_addon.amxx
instant_autoteambalance.amxx
amx_autodemorec.amxx
nice_kicker.amxx
afm.amxx
admin_freelook.amxx
auto_res.amxx
killa_hp.amxx
ad_manager.amxx
lady_models.amxx
fullupdate.amxx
parashut.amxx
bullet_damage.amxx
descriptive_fire_in_the_hole.amxx
time_presents_rus.amxx
sillyc4.amxx
new_vip.amxx