Пользователь
- Сообщения
- 4
- Реакции
- 0
- Ошибка
-
error 088: number of arguments does not match definition
- Компилятор
- WEB-компилятор
- Amx Mod X
- Исходный код
-
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <engine>
#include <fakemeta>
#define is_user_valid(%0) (%0 && %0 <= 32)
new bool:speed[33]
new SayText//, Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame;
native jbe_get_user_team(tempid);
native jbe_set_user_speed(id);
/*
public HookCurWeapon(id)
{
set_user_maxspeed(id , 350.0);
}
*/
public plugin_init()
{
//register_event( "CurWeapon", "speed_weapon", "be", "1=1" )
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
SayText = get_user_msgid("SayText")
register_clcmd( "abc_menu", "GIVEMenu" )
register_clcmd( "live_menu", "LIVEMenu" )
register_clcmd( "speed_menu", "SPEEDMenu" )
register_clcmd( "gravity_menu", "GRAVITYMenu" )
register_clcmd( "health_menu", "HEALTHMenu" )
register_clcmd( "rendering_menu", "RENDERINGMenu" )
//RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Ham_PlayerResetMaxSpeed_Post", true);
}
public GIVEMenu(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_F)
{
new menu
menu = menu_create("\wМеню выдачи","give_menu")
menu_additem( menu,"Воскреcить Игрока", "1", 0)
menu_additem( menu,"Скорость Игрокам", "2", 0)
menu_additem( menu,"Гравити Игрокам", "3", 0)
menu_additem( menu,"Жизни Игрокам", "4", 0)
menu_additem( menu,"Свечение Игрокам", "5", 0)
// menu_additem( menu,"Цвет граба", "6", 0)
menu_display(id, menu)
}
return PLUGIN_HANDLED
}
public give_menu(id, menu, key)
{
if(key == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new accss, clbck, data[6], name[64], itm
menu_item_getinfo(menu, key, accss, data, 5, name, 63, clbck)
itm = str_to_num(data)
switch(itm)
{
case 1:LIVEMenu(id)
case 2:SPEEDMenu(id)
case 3:GRAVITYMenu(id)
case 4:HEALTHMenu(id)
case 5:RENDERINGMenu(id)
//case 6:client_cmd(id,"dgrabcolor")
}
return PLUGIN_HANDLED
}
/*public speed_weapon(id)
{
if(speed[id])
set_user_maxspeed(id, 700.0)
}*/
/*public Ham_PlayerResetMaxSpeed_Post(id)
{
if(speed[id] && is_user_valid(id))
{
set_user_maxspeed(id, 700.0)
//jbe_set_user_speed(id)
}
}*/
public player_spawn(id)
{
speed[id] = false
}
public LIVEMenu(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_F)
{
new menu = menu_create( "\rМеню Возрождения", "menu_live" )
new players[32], pnum, tempid
new szName[32], szTempid[10]
//jbe_get_user_team(id)
get_players(players, pnum)
for(new i; i<pnum; i++)
{
//cs_get_user_team(players[i])
tempid = players[i]
if(!is_user_alive(tempid))
{
if (jbe_get_user_team(tempid) == 1 || jbe_get_user_team(tempid) == 2 && is_user_valid(tempid)){
get_user_name(tempid, szName, 31)
num_to_str(tempid, szTempid, 9)
menu_additem(menu, szName, szTempid, 0)
}
}
}
menu_display(id, menu, 0)
}
return PLUGIN_HANDLED
}
public menu_live(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64], playername[33], playername2[33]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new tempid = str_to_num(data)
//cs_get_user_team(tempid)
get_user_name(id, playername, 32)
get_user_name(tempid, playername2, 32)
ExecuteHamB(Ham_CS_RoundRespawn, tempid)
LIVEMenu(id)
color_chat(0, "/y[JBE] Админ /g%s /yвоскресил /ctr%s", playername, playername2)
menu_destroy(menu)
return PLUGIN_HANDLED
}
public SPEEDMenu(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_F)
{
new menu = menu_create( "\rМеню Скорости", "menu_speed" )
new players[32], pnum, tempid
new szName[32], szTempid[10]
//cs_get_user_team(id)
get_players(players, pnum)
for(new i; i<pnum; i++)
{
cs_get_user_team(players[i])
tempid = players[i]
if(get_user_maxspeed(tempid) < 600 && is_user_alive(tempid))
{
get_user_name(tempid, szName, 31)
num_to_str(tempid, szTempid, 9)
menu_additem(menu, szName, szTempid, 0)
}
}
menu_display(id, menu, 0)
}
return PLUGIN_HANDLED
}
public menu_speed(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64], playername[33], playername2[33]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new tempid = str_to_num(data)
//cs_get_user_team(tempid)
get_user_name(id, playername, 32)
get_user_name(tempid, playername2, 32)
jbe_set_user_speed(tempid, 600);
SPEEDMenu(id)
speed[id] = true
color_chat(0, "/y[JBE] Админ /g%s /yвыдал скорость /ctr%s", playername, playername2)
menu_destroy(menu)
return PLUGIN_HANDLED
}
public GRAVITYMenu(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_F)
{
new menu = menu_create( "\rМеню Гравитации", "menu_gravity" )
new players[32], pnum, tempid
new szName[32], szTempid[10]
//cs_get_user_team(id)
get_players(players, pnum)
for(new i; i<pnum; i++)
{
//cs_get_user_team(players[i])
tempid = players[i]
if(get_user_gravity(tempid) > 0.4 && is_user_alive(tempid))
{
get_user_name(tempid, szName, 31)
num_to_str(tempid, szTempid, 9)
menu_additem(menu, szName, szTempid, 0)
}
}
menu_display(id, menu, 0)
}
return PLUGIN_HANDLED
}
public menu_gravity(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64], playername[33], playername2[33]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new tempid = str_to_num(data)
//cs_get_user_team(tempid)
get_user_name(id, playername, 32)
get_user_name(tempid, playername2, 32)
set_user_gravity(tempid, 0.4)
GRAVITYMenu(id)
color_chat(0, "/y[JBE] Админ /g%s /yвыдал гравитацию /ctr%s", playername, playername2)
menu_destroy(menu)
return PLUGIN_HANDLED
}
public HEALTHMenu(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_F)
{
new menu = menu_create( "\rМеню Жизней", "menu_health" )
new players[32], pnum, tempid
new szName[32], szTempid[10]
//cs_get_user_team(id)
get_players(players, pnum)
for(new i; i<pnum; i++)
{
//cs_get_user_team(players[i])
tempid = players[i]
if(get_user_health(tempid) < 250 && is_user_alive(tempid))
{
get_user_name(tempid, szName, 31)
num_to_str(tempid, szTempid, 9)
menu_additem(menu, szName, szTempid, 0)
}
}
menu_display(id, menu, 0)
}
return PLUGIN_HANDLED
}
public menu_health(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64], playername[33], playername2[33]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new tempid = str_to_num(data)
//cs_get_user_team(tempid)
get_user_name(id, playername, 32)
get_user_name(tempid, playername2, 32)
set_user_health(tempid, 250)
client_cmd(id,"health_menu")
color_chat(0, "/y[JBE] Админ /g%s /yвыдал 250HP /ctr%s", playername, playername2)
menu_destroy(menu)
return PLUGIN_HANDLED
}
public RENDERINGMenu(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_F)
{
new menu = menu_create( "\rМеню Подсветки", "menu_rendering" )
new players[32], pnum, tempid
new szName[32], szTempid[10]
//cs_get_user_team(id)
get_players(players, pnum)
for(new i; i<pnum; i++)
{
//cs_get_user_team(players[i])
tempid = players[i]
if(is_user_alive(tempid))
{
get_user_name(tempid, szName, 31)
num_to_str(tempid, szTempid, 9)
menu_additem(menu, szName, szTempid, 0)
}
}
menu_display(id, menu, 0)
}
return PLUGIN_HANDLED
}
public menu_rendering(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64], playername[33], playername2[33]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new tempid = str_to_num(data)
//cs_get_user_team(tempid)
get_user_name(id, playername, 32)
get_user_name(tempid, playername2, 32)
new Red = random_num(0,255)
new Green = random_num(0,255)
new Blue = random_num(0,255)
set_user_rendering(tempid,kRenderFxGlowShell,Red,Green,Blue,kRenderNormal,0)
RENDERINGMenu(id)
color_chat(0, "/y[JBE] Админ /g%s /yвыдал свечение /ctr%s", playername, playername2)
menu_destroy(menu)
return PLUGIN_HANDLED
}
stock color_chat(const id, const input[], any:...)
{
new iCount = 1, iPlayers[32]
static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)
replace_all(szMsg, 190, "/g", "^4")
replace_all(szMsg, 190, "/y", "^1")
replace_all(szMsg, 190, "/ctr", "^3")
replace_all(szMsg, 190, "/w", "^0")
if(id) iPlayers[0] = id
else get_players(iPlayers, iCount, "ch")
for (new i = 0; i < iCount; i++)
{
if (is_user_connected(iPlayers[i]))
{
message_begin(MSG_ONE_UNRELIABLE, SayText, _, iPlayers[i])
write_byte(iPlayers[i])
write_string(szMsg)
message_end()
}
}
}
Ошибка только тогда, когда в jbe_set_user_speed(tempid, 600); указано значение скорости. Если оставить функцию без значения jbe_set_user_speed(tempid); , то компилируется без ошибок, но тогда скорость выдаётся стандартная, то есть не изменяется.
Ошибка в 207 строке
Ошибка в 207 строке
В этой теме было размещено решение! Перейти к решению.