3Be3Da
Пользователь
- Регистрация
- 14 Авг 2017
- Сообщения
- 131
- Симпатии
- 3
- Предупреждения
- 30
- Пол
- Мужской
Не компилируется код выдаёт ошибки
[DOUBLEPOST=1523548170][/DOUBLEPOST]Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Possibly unintended assignment on line 64
Error: Only a single statement (or expression) can follow each "case" on line 71
Warning: Symbol is never used: "case6" on line 95
Warning: Symbol is never used: "case5" on line 95
Warning: Symbol is never used: "case4" on line 95
Warning: Symbol is never used: "case3" on line 95
Warning: Symbol is never used: "case2" on line 95
Error: Unmatched closing brace on line 96
2 Errors.
Could not locate output file D:\amxx studio\Untitled.amx (compile failed).
Код:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#include <cstrike>
#define PLUGIN "give_hp_player"
#define VERSION "1.0"
#define AUTHOR "3Be3Da"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("amx_money", "get_money", ADMIN_RCON)
}
new g_isplayerHP[33]
public get_money(id)
{
new menu = menu_create("\gВыдача \rденег", "give_money")
menu_additem(menu, "/yВыдать деньги \r1000", "1")
menu_additem(menu, "\yВыдать деньги \r3000", "2")
menu_additem(menu, "\yВыдать деньги \r5000", "3")
menu_additem(menu, "\yВыдать деньги \r10000", "4")
menu_additem(menu, "\yВыдать деньги \r16000", "5")
menu_additem(menu, "\yВыдать деньги \r25000", "6")
menu_setprop(menu, MPROP_EXIT, "Выход")
menu_display(id, menu, 0)
}
public give_money(id, menu, iItem)
{
if(!is_user_connected(id))
return;
if(iItem == MENU_EXIT)
return;
g_isplayerHP[id] = iItem
menu_player(id)
}
public menu_player(id)
{
new menu = menu_create("\yКакому игроку дать?", "player_give")
new sName[32], sItem[3]
for(new iPlayer = 1; iPlayer < get_maxplayers(); iPlayer++)
{
if(!is_user_alive(iPlayer))
continue;
get_user_name(iPlayer, sName, 32)
num_to_str(iPlayer, sItem, 3)
menu_additem(menu, sName, sItem)
}
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
public player_give(id, menu, iItem)
{
if(!is_user_connected(id))
return;
if(iItem = MENU_EXIT)
return;
iItem++;
if(!is_user_alive(iItem))
return;
switch(g_isplayerHP[id])
{
case1:
{
cs_set_user_money(iItem, cs_get_user_money(iItem) + 1000)
}
case2:
{
cs_set_user_money(iItem, cs_get_user_money(iItem) + 3000)
}
case3:
{
cs_set_user_money(iItem, cs_get_user_money(iItem) + 5000)
}
case4:
{
cs_set_user_money(iItem, cs_get_user_money(iItem) + 10000)
}
case5:
{
cs_set_user_money(iItem, cs_get_user_money(iItem) + 16000)
}
case6:
{
cs_set_user_money(iItem, cs_get_user_money(iItem) + 25000)
}
}
}
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Possibly unintended assignment on line 64
Error: Only a single statement (or expression) can follow each "case" on line 71
Warning: Symbol is never used: "case6" on line 95
Warning: Symbol is never used: "case5" on line 95
Warning: Symbol is never used: "case4" on line 95
Warning: Symbol is never used: "case3" on line 95
Warning: Symbol is never used: "case2" on line 95
Error: Unmatched closing brace on line 96
2 Errors.
Could not locate output file D:\amxx studio\Untitled.amx (compile failed).