Меню выбора команды

Сообщения
95
Реакции
6
Помог
2 раз(а)
Ошибка
1) Не меняется надписи
2) Не работают кнопки
ОС
Windows
Amx Mod X
AMX Mod X 1.9.0.5235 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Dec 18 2018 01:20:16
Built from: https://github.com/alliedmodders/amxmodx/commit/6c53524d
Build ID: 5235:6c53524d
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7 (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
ReGamedll
ReGameDLL version: 5.7.0.319-dev
Build date: 10:52:38 Dec 23 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/9d89a34
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5235 ini Start ANY
[ 2] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 3] CSX RUN - csx_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 4] ReAPI RUN - reapi_amxx.dll v5.6.0.161-dev pl1 ANY Never
4 plugins, 4 running
Список плагинов
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5235 ini Start ANY
[ 2] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 3] CSX RUN - csx_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 4] ReAPI RUN - reapi_amxx.dll v5.6.0.161-dev pl1 ANY Never
4 plugins, 4 running
] amxx plugins
Currently loaded plugins:
name version author file status
[ 1] Admin Base 1.9.0.5235 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5235 AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.9.0.5235 AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.9.0.5235 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0.5235 AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.9.0.5235 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0.5235 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0.5235 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.9.0.5235 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0.5235 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0.5235 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0.5235 AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.9.0.5235 AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.9.0.5235 AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.9.0.5235 AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.9.0.5235 AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.9.0.5235 AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.9.0.5235 AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.9.0.5235 AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.9.0.5235 AMXX Dev Team statscfg.amxx running
[ 21] StatsX 1.9.0.5235 AMXX Dev Team statsx.amxx running
[ 22] Public Core 0.1 Skiptik CorePublic.amxx debug
22 plugins, 22 running
Автор плагина
-
Версия плагина
-
Исходный код
#include <amxmodx>
#include <reapi>

#define PLUGIN_NAME "Public Core"
const MAX_MENU_TEXT_LEN = 512
const KeyMenu = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)

new bool:g_bIsPlayerBot[MAX_CLIENTS+1];

public plugin_init(){
register_plugin(PLUGIN_NAME, "0.1", "Skiptik")
register_menucmd(register_menuid("Show_TeamMenu"), KeyMenu, "Handle_ChooseTeamMenu")
register_clcmd("chooseteam", "Show_TeamMenu")
register_clcmd("jointeam", "Show_TeamMenu")
register_clcmd("/menu", "Show_TeamMenu")
register_message(get_user_msgid("VGUIMenu"), "MsgVGUIMenu");
}
public client_authorized(id)
{
g_bIsPlayerBot[id] = bool:is_user_bot(id)
}

public MsgVGUIMenu(const iMsgID, const iDest, const iIndex) {
Show_TeamMenu(iIndex);
return PLUGIN_HANDLED;
}

public Show_TeamMenu(id){
new NumCT = get_member_game(m_iNumCT), NumT = get_member_game(m_iNumTerrorist), TeamName:iTeam = get_member(id, m_iTeam)
new szMenu[MAX_MENU_LENGTH], iKeys = (1<<9), iLen = formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\yВыбор команды^n^n");
if(get_member(id, m_iTeam) == TEAM_UNASSIGNED){
if(NumT > NumCT){
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \dТеррористы^n")
}else{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r1. \wТеррористы^n")
iKeys |= (1<<0)
}
if(NumCT > NumT){
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r2. \dКонтр-Террористы^n^n")
}else{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r2. \wКонтр-Террористы^n^n")
iKeys |= (1<<1)
}
}else{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "Вы: %s", iTeam == TEAM_TERRORIST ? "Террорист^n^n" : iTeam == TEAM_CT ? "Контр-террорист^n^n" : "Спектатор^n^n")
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r3. \wПерейти за противников^n")
iKeys |= (1<<2)
}
if(get_member(id, m_iTeam) == TEAM_SPECTATOR){
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r6. \dСпектаторы^n^n");
}else{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r6. \wСпектаторы^n^n");
iKeys |= (1<<5)
}
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r7. \wПриобрести бонусы!^n")
iKeys |= (1<<6)
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r8. \wПеревод денег^n")
iKeys |= (1<<7)
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r9. \wИнформация о проекте^n")
iKeys |= (1<<8)
formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\r0. \wВыход^n^n")
return show_menu(id, iKeys, szMenu, -1, "Show_TeamMenu");
}

public Handle_ChooseTeamMenu(id, iKey)
{
switch(iKey)
{
case 0: {
rg_join_team(id, TEAM_TERRORIST);
rg_set_user_team(id, TEAM_TERRORIST, MODEL_AUTO);
}
case 1: {
rg_join_team(id, TEAM_CT);
rg_set_user_team(id, TEAM_CT, MODEL_AUTO);
}
case 3: {
switch (TeamName:get_member(id, m_iTeam)) {
case TEAM_TERRORIST: {
rg_join_team(id, TEAM_CT);
rg_set_user_team(id, TEAM_TERRORIST, MODEL_AUTO);
}
case TEAM_CT: {
rg_join_team(id, TEAM_TERRORIST);
rg_set_user_team(id, TEAM_TERRORIST, MODEL_AUTO);
}
case TEAM_SPECTATOR: {
engclient_cmd(id, "jointeam", "5");
}
}
}
case 5:{
if(is_user_alive(id)){
user_kill(id, 1);
rg_join_team(id, TEAM_SPECTATOR);
}else{
rg_join_team(id, TEAM_SPECTATOR);
}
}
case 6:{

}
case 7: {

}
case 8: {

}
}
return PLUGIN_HANDLED;
}
Если игрок перешел за какую либо команду то ему не высвечивается текст который после проверки на TEAM_UNASSIGNED
Если перешел за команду то кнопки ни как не взаимодействуют с меню кроме цифры 6 7 8 9
Подскажите в чем проблема, если вам не трудно будет
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу