- Код: Выделить всё
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0
new const PLUGIN[] = "NewCSDM_Menu"
new const VERSION[] = "1.2"
new const AUTHOR[] = "NewGame_PL"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_menu("Menu_1", keys, "func_menu2")
register_concmd("chooseteam", "Server_Menu")
register_clcmd("chooseteam", "Server_Menu")
register_clcmd("say /vk", "info_group")
}
public info_group(id){
new name[32]
get_user_name(id, name, 31)
ColorChat(id, GREEN, "^1[^3Наша Группа^1] ^4%s, ^1Наша группа: ^3 vk.com/pro_goodgame", name)
}
public Server_Menu(id)
{
new name[32]
get_user_name(id, name, 31)
static menu[650], iLen
iLen = 0
iLen = formatex(menu[iLen], charsmax(menu) - iLen, "\yМеню \wGoodGame-PrO.ru ^n\dПривет, \r%s^n^n", name);
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r1. \wУстановить \yПушку^n")
keys |= MENU_KEY_1
}
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r2. \wУстановить \yЛазер^n")
keys |= MENU_KEY_2
}
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r3. \wУстановить \yРаздатчик^n^n")
keys |= MENU_KEY_3
}
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r4. \yМагазин | \wУмений^n")
keys |= MENU_KEY_4
}
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r5. \yМагазин | \wGOLD Оружий^n")
keys |= MENU_KEY_5
}
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r6. \wПередать \yДеньги^n")
keys |= MENU_KEY_7
}
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r7. \wУзнать \yГруппу сервера^n")
keys |= MENU_KEY_8
}
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r8. \wСкинуть \yСчет^n")
keys |= MENU_KEY_9
}
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "^n\r0. \rВыход^n")
keys |= MENU_KEY_0
show_menu(id, keys, menu, -1, "Menu_1");
return PLUGIN_HANDLED
}
public func_menu2(id, key)
{
switch(key)
{
case 1: client_cmd(id, "sentry_build")
case 2: client_cmd(id, "+setlaser")
case 3: client_cmd(id, "build_dispenser")
case 4: client_cmd(id, "say /shop")
case 5: client_cmd(id, "say /shopmenu")
case 6: client_cmd(id, "tm")
case 7: client_cmd(id, "say /vk")
case 8: client_cmd(id, "say /rs")
}
}
а вот ошибка
- Код: Выделить всё
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team
/hlds/web/www/amxxpc/bin/amxx-1.8.2/include/colorchat.inc(295) : warning 201: redefinition of constant/macro (symbol "DontChange")
/hlds/web/www/amxxpc/bin/amxx-1.8.2/include/colorchat.inc(298) : warning 201: redefinition of constant/macro (symbol "Grey")
/hlds/web/www/amxxpc/bin/amxx-1.8.2/include/colorchat.inc(299) : warning 201: redefinition of constant/macro (symbol "Red")
/hlds/web/www/amxxpc/bin/amxx-1.8.2/include/colorchat.inc(300) : warning 201: redefinition of constant/macro (symbol "Blue")
/hlds/web/www/amxxpc/bin/amxx-1.8.2/include/colorchat.inc(321) : error 040: duplicate "case" label (value 2)
/hlds/web/www/amxxpc/work/scripting/menu_csdm.sma(33) : warning 217: loose indentation
/hlds/web/www/amxxpc/work/scripting/menu_csdm.sma(34) : warning 217: loose indentation
1 Error.
Could not locate output file /hlds/web/www/amxxpc/work/plugins/menu_csdm.amx (compile failed)
его не компилирует на AmxModX 1.8.2
Неинформативное название темы (исправлено) // Subb98