12 ошибок при компилировании

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
67
Реакции
4
Ошибка
12 ошибок при компилировании
Компилятор
Локальный
Amx Mod X
1.9.0
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>
#include <engine>
#include <hamsandwich>

new Ent
new bool:Speed[33]
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

#define PLUGIN "Legenda"
#define VERSION "0.8"
#define AUTHOR "Varty"
#define SOUND_MENU "knf_adminka/menu.wav"

public plugin_precache() {
precache_sound(SOUND_MENU)
}

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_menu("MenuS", keys, "func_menu2")
register_clcmd("legenda", "menuall")
register_clcmd("say /legenda", "menuall")

register_forward(FM_AddToFullPack, "addToFullPack_Post", 1)

RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
}
public Player_Spawn(id)
{
if(!is_user_connected(id))
return HAM_IGNORED

Speed[id] = false

return HAM_IGNORED
}
public menuall(id)
{
static menu[650], iLen
iLen = 0
if(get_user_flags(id) & ADMIN_LEVEL_B)
iLen = formatex(menu[iLen], charsmax(menu) - iLen, "\d[KnifeDM] \rЛегенда меню^n^n");
else
iLen = formatex(menu[iLen], charsmax(menu) - iLen, "\d[KnifeDM] \rЛегенда меню \d[Нет доступа]^n^n");

if(get_user_flags(id) & ADMIN_LEVEL_B)
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r1. \wВыдать невидимость^n")
keys |= MENU_KEY_1
}
else
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r1. \dВыдать невидимость^n")
keys &= ~MENU_KEY_1
}//
if(get_user_flags(id) & ADMIN_LEVEL_B)
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r2. \wВыдать деньги \y[10000$]^n")
keys |= MENU_KEY_2
}
else
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r2. \dВыдать деньги [10000$]^n")
keys &= ~MENU_KEY_2
}//
if(get_user_flags(id) & ADMIN_LEVEL_B)
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r3. \wВыдать гравитацию^n")
keys |= MENU_KEY_3
}
else
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r3. \dВыдать гравитацию^n")
keys &= ~MENU_KEY_3
}//
if(get_user_flags(id) & ADMIN_LEVEL_B)
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r4. \wВыдать скорость^n^n")
keys |= MENU_KEY_4
}
else
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r4. \dВыдать скорость^n^n")
keys &= ~MENU_KEY_4
}//
if(get_user_flags(id) & ADMIN_LEVEL_B)
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r5. \wОбнулить \yвсе возможности^n")
keys |= MENU_KEY_5
}
else
{
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r5. \dОбнулить все возможности^n")
keys &= ~MENU_KEY_5
}
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "^n\r0. \wЗакрыть")
keys |= MENU_KEY_0

show_menu(id, keys, menu, -1, "MenuS");
return PLUGIN_HANDLED
}


public func_menu2(id, key)
{
client_cmd(id, "spk %s", SOUND_MENU)
switch(key)
{
case 0: elite_weapon_player(id)
case 1: money(id)
case 2: grava(id)
case 3: speed(id)
case 4: nulled(id)
}
}
public nulled(id)
{
new i_Menu = menu_create("\d[KnifeDM] \rВыберите игрока", "nulleds")
new s_Players[32], i_Num, i_Player
new s_Name[32], s_Player[10]

get_players(s_Players, i_Num)

for(new i; i < i_Num; i++)
{
i_Player = s_Players[i]

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T))
{
get_user_name(i_Player, s_Name, charsmax(s_Name))
num_to_str(i_Player, s_Player, charsmax(s_Player))
menu_additem(i_Menu, s_Name, s_Player, 0)
}
}

menu_display(id, i_Menu, 0)
}
public nulleds(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new name[32]
get_user_name(id, name, charsmax(name))

new s_Data[6], 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)

new i_Player = str_to_num(s_Data)

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T))
{
set_user_gravity(i_Player, 1.0)
set_user_maxspeed(i_Player, 250.0)
set_user_footsteps(i_Player, 1 );
set_entity_visibility(i_Player,1)
set_entity_visibility(Ent,1)
client_print_color(0, print_team_default, "^1[^4KnifeDM^1] Легенда ^4%s ^1забрал ^3все возможности ^1у игрока ^4%s", name, s_Name)

nulled(id)
}

menu_destroy(menu)
return PLUGIN_HANDLED
}
//
public speeds(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new name[32]
get_user_name(id, name, charsmax(name))

new s_Data[6], 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)

new i_Player = str_to_num(s_Data)

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T) && !Speed[i_Player])
{
set_user_maxspeed(i_Player, 450.0)
client_print_color(0, print_team_default, "^1[^4KnifeDM^1] Легенда ^4%s ^1выдал ^3скорость ^1игроку ^4%s", name, s_Name)

speed(id)
}

menu_destroy(menu)
return PLUGIN_HANDLED
}
public speed(id)
{
new i_Menu = menu_create("\d[KnifeDM] \rВыберите игрока", "speeds")
new s_Players[32], i_Num, i_Player
new s_Name[32], s_Player[10]

get_players(s_Players, i_Num)

for(new i; i < i_Num; i++)
{
i_Player = s_Players[i]

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T) && !Speed[i_Player])
{
get_user_name(i_Player, s_Name, charsmax(s_Name))
num_to_str(i_Player, s_Player, charsmax(s_Player))
menu_additem(i_Menu, s_Name, s_Player, 0)
}
}

menu_display(id, i_Menu, 0)
}
public grava(id)
{
new i_Menu = menu_create("\d[KnifeDM] \rВыберите игрока", "gravas")
new s_Players[32], i_Num, i_Player
new s_Name[32], s_Player[10]

get_players(s_Players, i_Num)

for(new i; i < i_Num; i++)
{
i_Player = s_Players[i]

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T))
{
get_user_name(i_Player, s_Name, charsmax(s_Name))
num_to_str(i_Player, s_Player, charsmax(s_Player))
menu_additem(i_Menu, s_Name, s_Player, 0)
}
}

menu_display(id, i_Menu, 0)
}
public gravas(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new name[32]
get_user_name(id, name, charsmax(name))

new s_Data[6], 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)

new i_Player = str_to_num(s_Data)

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T))
{
set_user_gravity(i_Player, 0.3)
client_print_color(0, print_team_default, "^1[^4KnifeDM^1] Легенда ^4%s ^1выдал ^3гравитацию ^1игроку ^4%s", name, s_Name)

grava(id)
}

menu_destroy(menu)
return PLUGIN_HANDLED
}

public money(id)
{
new i_Menu = menu_create("\d[KnifeDM] \rВыберите игрока", "moneys")
new s_Players[32], i_Num, i_Player
new s_Name[32], s_Player[10]

get_players(s_Players, i_Num)

for(new i; i < i_Num; i++)
{
i_Player = s_Players[i]

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T))
{
get_user_name(i_Player, s_Name, charsmax(s_Name))
num_to_str(i_Player, s_Player, charsmax(s_Player))
menu_additem(i_Menu, s_Name, s_Player, 0)
}
}

menu_display(id, i_Menu, 0)
}
public moneys(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new name[32]
get_user_name(id, name, charsmax(name))

new s_Data[6], 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)

new i_Player = str_to_num(s_Data)

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T))
{

new MyMoney[32]
MyMoney[id] = cs_get_user_money(i_Player)
cs_set_user_money(i_Player,MyMoney[i_Player] + 10000 );

client_print_color(0, print_team_default, "^1[^4KnifeDM^1] Легенда ^4%s ^1выдал^3 10000$ ^1игроку ^4%s", name, s_Name)

money(id)

}

menu_destroy(menu)
return PLUGIN_HANDLED
}

public elite_weapon_player(id)
{
new i_Menu = menu_create("\d[KnifeDM] \rВыберите игрока", "choice_elite_weapon_player")
new s_Players[32], i_Num, i_Player
new s_Name[32], s_Player[10]

get_players(s_Players, i_Num)

for(new i; i < i_Num; i++)
{
i_Player = s_Players[i]

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T))
{
get_user_name(i_Player, s_Name, charsmax(s_Name))
num_to_str(i_Player, s_Player, charsmax(s_Player))
menu_additem(i_Menu, s_Name, s_Player, 0)
}
}

menu_display(id, i_Menu, 0)
}
public choice_elite_weapon_player(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new name[32]
get_user_name(id, name, charsmax(name))

new s_Data[6], 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)

new i_Player = str_to_num(s_Data)

if(is_user_alive(i_Player) && (cs_get_user_team(i_Player) == CS_TEAM_CT || cs_get_user_team(i_Player) == CS_TEAM_T))
{
set_user_footsteps(i_Player, 1 );
set_entity_visibility(i_Player,0)
set_entity_visibility(Ent,0)

client_print_color(0, print_team_default, "^1[^4KnifeDM^1] Легенда ^4%s ^1выдал ^3невидимость ^1игроку ^4%s", name, s_Name)

elite_weapon_player(id)
}

menu_destroy(menu)
return PLUGIN_HANDLED
}
Добрый день. Не пойму, чего ему не нравится?
 
В этой теме было размещено решение! Перейти к решению.

Вложения

  • 32 KB Просмотры: 222
Сообщения
1,293
Реакции
2,294
Помог
57 раз(а)
CTapbIu, да, ужасно. Этот шедевр от школьника к школьнику кочует, в различных вариациях. И всё время автор новый.
 
Сообщения
67
Реакции
4
CTapbIu, да, ужасно. Этот шедевр от школьника к школьнику кочует, в различных вариациях. И всё время автор новый.
Спасибо большое за информацию. Значит на помойку так на помойку.

Там ему и место :thank_you:
 
Статус
В этой теме нельзя размещать новые ответы.

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

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