- Ошибка
-
L 02/26/2018 - 15:51:13: [AMXX] Displaying debug trace (plugin "dm_hook.amxx", version "2.0")
- ОС
- Linux
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.633-dev
Build date: 16:51:50 Jan 31 2018 (1390)
Build from: https://github.com/dreamstalker/rehlds/commit/82ee1b0
- ReGamedll
-
ReGameDLL version: 5.5.0.291-dev
Build date: 09:37:02 Feb 8 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/40f3bc4
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.75 ini Start Never
[ 2] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 3] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 4] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite ini ANY ANY
[ 5] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC3 ini ANY ANY
[ 6] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 7] AMX Mod X RUN - amxmodx_mm_i386.so v1.8.3-Re ini Start ANY
[ 8] FakeMeta RUN - fakemeta_amxx_i386.so v1.8.3-Re pl7 ANY ANY
[ 9] MySQL RUN - mysql_amxx_i386.so v1.8.3-Re pl7 ANY ANY
[10] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.8.3-Re pl7 ANY ANY
[11] ReAPI RUN - reapi_amxx_i386.so v5.5.0.149-dev pl7 ANY Never
[12] CSX RUN - csx_amxx_i386.so v1.8.3-Re pl7 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.8.3-Re pl7 ANY ANY
[14] CStrike RUN - cstrike_amxx_i386.so v1.8.3-Re pl7 ANY ANY
[15] Fun RUN - fun_amxx_i386.so v1.8.3-Re pl7 ANY ANY
15 plugins, 15 running
- Список плагинов
-
[ 1] Admin Loader 3.1 neygomon admin_loader.am running
[ 2] FreshBans 1.3.8b kanagava fresh_bans_for_ running
[ 3] DopBan 2.8.2b kanagava dop_ban2-282-18 running
[ 4] Players Menu 1.7 neugomon players_menu.am running
[ 5] Admin Commands 1.8.2 AMXX Dev Team admincmd.amxx running
[ 6] Admin Votes 1.8.2 AMXX Dev Team adminvote.amxx running
[ 7] Menus Front-End 1.5 neugomon menufront_end.a running
[ 8] menu on key m 228 unknown menu.amxx running
[ 9] CSStatsX SQL 0.7.4 serfreeman1337 csstatsx_sql.am running
[ 10] AES: StatsX 0.5.8 Vega serfreeman1337/s aes_statsx_cstr running
[ 11] Stats Configuration 1.8.2 AMXX Dev Team statscfg.amxx running
[ 12] Map Spawns Editor 1.0.16 iG_os map_spawns_edit running
[ 13] Advanced MapChooser 1.3 neygomon map_chooser.amx running
[ 14] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 15] Train Killer 1.0 Pastout! trainkiller.amx running
[ 16] [MG] Hook by Nickron 2.0 LLInH9rA, Remake dm_hook.amxx debug
[ 17] [183] Ultimate Grab 17.10.30 Ian Cammarata & ultimate_grab.a running
[ 18] Parachute Lite 1.0 Leo_[BH] parachute_lite. running
[ 19] [ReAPI] Custom Models 1.6.1 neugomon custom_models.a running
[ 20] Cam Change 1.1 Bl0ck Cam_Change.amxx running
[ 21] NoRound Balancer 1.3 neygomon noround_balance running
[ 22] Change Team 1.1 neygomon changeteam.amxx running
[ 23] FM ResetScore 0.1 neygomon fm_rs.amxx running
[ 24] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 25] Bhop for admins 1.2 Excessus bhop_admin.amxx running
[ 26] Advert Messages 1.22 neygomon adverts.amxx running
[ 27] Lite Translit 2.8 neygomon lite_translit.a running
[ 28] SF Warn Menu 0.1.4g serfreeman1337 sf_admin_warns. running
[ 29] Radio Block 1.0 alliedmods Block_Radio_nor running
[ 30] WalkGuard 1.3.2 mogel walkguard_free. running
[ 31] Admin_Check 0.1 CepeH9 adminChek.amxx running
[ 32] Ping Checker 26.0.1 RC1 h1k3 ping_checker.am running
[ 33] Ultimate Chats Control 4.1 neygomon ucc.amxx running
[ 34] СуперМаркет 3.0 Pain market.amxx debug
[ 35] Duels 0.75 Psycrow next21_duels_v2 running
[ 36] unknown unknown unknown blocFire.amxx running
[ 37] Plugins Controller 1.0 neygomon plugins_control stopped
[ 38] RC BaseChanger 1.0 phe rc_basechanger. stopped
[ 39] ReChecker Logging 1.0 phe rc_logging.amxx running
[ 40] Advanced Experience Sy 0.5.8 Vega serfreeman1337/s aes_main.amxx running
[ 41] AES: CStrike Addon 0.5.8 Vega serfreeman1337/s aes_exp_cstrike running
[ 42] AES: Informer 0.5.8 Vega serfreeman1337/s aes_informer.am running
42 plugins, 40 running
- Исходный код
-
#include <amxmodx>
#include <cstrike>
#include <amxmisc>
#include <engine>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
#include <colorchat>
#define HOOK_LEVEL ADMIN_LEVEL_H // Уровен доступа
#define TRAIL_LIFE 10 // Жизнь полосы
#define TRAIL_WIDTH 10 // Ширина полосы
#define TRAIL_RED 255 // Цвет: Красный
#define TRAIL_GREEN 0 // Цвет: Зелёный
#define TRAIL_BLUE 0 // Цвет: Голубой
#define TRAIL_BRIGTHNESS 220 // Яркость
#define TRAIL_LIF 10 // Жизнь полосы
#define TRAIL_WIDT 10 // Ширина полосы
#define TRAIL_RE 0 // Цвет: Красный
#define TRAIL_GREE 0 // Цвет: Зелёный
#define TRAIL_BLU 255 // Цвет: Голубой
#define TRAIL_BRIGTHNES 220 // Яркость
#pragma tabsize 0
new bool:canusehook[32]
new bool:ishooked[32]
new hookorigin[32][3]
new Enable
new Glow, GlowRandom, GlowR, GlowG, GlowB
new Fade, FadeRandom, fadeR, fadeG, fadeB
new model_gibs, gTrail
//new HookSpeed
new g_iBeamSprite
new g_speed[33]
public plugin_init() {
register_plugin("[MG] Hook by Nickron","2.0","LLInH9rA, Remake Nickron")
register_clcmd("+hook","hook_on",HOOK_LEVEL)
register_clcmd("-hook","hook_off",HOOK_LEVEL)
register_clcmd("hook","Menu_hook")
register_clcmd("say /hook","Menu_hook")
register_clcmd("say_team /hook","Menu_hook")
//register_clcmd("amx_hook","give_hook",HOOK_LEVEL,"<name|#userid|steamid|@ALL> <on/off>") // Дать/отнять хук
Enable = register_cvar( "hook_enable", "1" ) // Вкл./Выкл. Плагин (По умолчанию Вкл)
Glow = register_cvar( "hook_glow", "1" ) // Аура при полете Вкл./Выкл. (По умолчанию Вкл)
GlowRandom = register_cvar( "hook_glow_random", "1" ) // Рандомная подсветка
GlowR = register_cvar( "hook_glow_r", "255" ) // Цвет свечения(красный)
GlowG = register_cvar( "hook_glow_g", "255" ) // Цвет свечения(зеленый)
GlowB = register_cvar( "hook_glow_b", "255" ) // Цвет свечения(синий)
Fade = register_cvar( "hook_screenfade", "0" ) // Затемнение экрана при полете Вкл./Выкл. (По умолчанию Вкл)
FadeRandom = register_cvar( "hook_screenfade_random", "1" ) // Использовать рандомный цвет (1 - да, 2 -нет)(По умолчанию 1)
fadeR = register_cvar( "hook_fade_r", "255" ) // Цвет затемнения экрана при полете(красный)
fadeG = register_cvar( "hook_fade_g", "255" ) // Цвет затемнения экрана при полете(зеленый)
fadeB = register_cvar( "hook_fade_b", "255" ) // Цвет затемнения экрана при полете(синий)
//HookSpeed = register_cvar( "hook_speed", "500" ) // Скорость (По умолчанию: 350)
}
public plugin_precache() {
g_iBeamSprite = precache_model("sprites/dm_hook/lgtning.spr");
model_gibs = precache_model("sprites/dm_hook/pink.spr")
gTrail = precache_model("sprites/dm_hook/speed.spr")
precache_sound("dm_hook/exparrow_shoot1.wav")
}
public Menu_hook(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H || get_user_flags(id) & ADMIN_LEVEL_H)
{
new menu = menu_create("\rСкорость паутины","menu_hook")
if(g_speed[id] == 0)
{
menu_additem(menu,"Низкая \d- \yВкл.", "1", 0)
}else{
menu_additem(menu,"Низкая \d- \rВыкл.", "1", 0)
}
if(g_speed[id] == 1)
{
menu_additem(menu,"Стандарт \d- \yВкл.", "2", 0)
}else{
menu_additem(menu,"Стандарт \d- \rВыкл.", "2", 0)
}
if(g_speed[id] == 2)
{
menu_additem(menu,"Высокая \d- \yВкл.", "3", 0)
}else{
menu_additem(menu,"Высокая \d- \rВыкл.", "3", 0)
}
menu_setprop(menu , MPROP_NEXTNAME, "Далее")
menu_setprop(menu , MPROP_BACKNAME, "Назад")
menu_setprop(menu , MPROP_EXITNAME, "Выход")
menu_setprop(menu , MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu)
}else{
ColorChat(id, RED, "^4[Нация Ножей] ^3У тебя нет паутинки.")
}
return PLUGIN_HANDLED
}
public menu_hook(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:
{
if(g_speed[id] == 0)
{
ColorChat(id, RED, "^4[Нация Ножей] ^3Уже установлено.")
Menu_hook(id)
}else{
g_speed[id] = 0
ColorChat(id, RED, "^4[Нация Ножей] ^1Вы выбрали скорость паутины: ^3Низкая^1.")
}
}
case 2:
{
if(g_speed[id] == 1)
{
ColorChat(id, RED, "^4[Нация Ножей] ^3Уже установлено.")
Menu_hook(id)
}else{
g_speed[id] = 1
ColorChat(id, GREY, "^4[Нация Ножей] ^1Вы выбрали скорость паутины: ^3Стандарт^1.")
}
}
case 3:
{
if(g_speed[id] == 2)
{
ColorChat(id, RED, "^4[Нация Ножей] ^3Уже установлено.")
Menu_hook(id)
}else{
g_speed[id] = 2
ColorChat(id, BLUE, "^4[Нация Ножей] ^1Вы выбрали скорость паутины: ^3Высокая^1.")
}
}
}
return PLUGIN_HANDLED
}
public client_disconnect(id) {
remove_hook(id)
g_speed[id] = 1
}
public client_putinserver(id) {
remove_hook(id)
g_speed[id] = 1
}
// =================================================================================================
public give_hook(id,level,cid) {
if(!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new name[32]
get_user_name(id,name,32)
new szarg1[32], szarg2[8], bool:mode
read_argv(1,szarg1,32)
read_argv(2,szarg2,32)
if(equal(szarg2,"on"))
mode = true
if(equal(szarg1,"@ALL")) {
for(new i=1;i<=get_maxplayers();i++) {
if(is_user_connected(i) && is_user_alive(i)) {
canusehook[i-1] = mode
if(mode) {
ColorChat(i, BLUE, "^4[Нация Ножей] ^1Отец ^3%s ^1дал всем игрокам ^4hook^1.",name)
ColorChat(i, GREY, "^4[Нация Ножей] ^1Забиндить: ^3bind ^"^4кнопка^3^" ^"^4+hook^3^"")
}
else
ColorChat(i, RED, "^4[Нация Ножей] ^1Отец ^3%s ^1забрал у всех игроков ^4hook^1.",name)
}
}
}
else {
new pid = cmd_target(id,szarg1,2)
if(pid > 0) {
canusehook[pid-1] = mode
if(mode) {
ColorChat(pid, BLUE, "^4[Нация Ножей] ^1Отец ^3%s ^1дал всем игрокам ^4hook^1.",name)
ColorChat(pid, GREY, "^4[4Нация Ножей] ^1Забиндить: ^3bind ^"^4кнопка^3^" ^"^4+hook^3^"")
}
else
ColorChat(pid, RED, "^4[Нация Ножей] ^1Отец ^3%s ^1забрал у всех игроков ^4hook^1.",name)
}
}
return PLUGIN_HANDLED
}
// =================================================================================================
public hook_on(id,level,cid)
{
if( get_pcvar_num( Enable ) )
{
if(!canusehook[id-1] && !cmd_access(id,level,cid,1))
return PLUGIN_HANDLED
if(get_user_flags(id) & ADMIN_BAN)
{
get_user_origin(id,hookorigin[id-1],3)
if(callfunc_begin("detect_cheat","prokreedz.amxx") == 1) {
callfunc_push_int(id)
callfunc_push_str("Hook")
callfunc_end()
}
ishooked[id-1] = true
emit_sound(id,CHAN_STATIC,"dm_hook/exparrow_shoot1.wav",1.0,ATTN_NORM,0,PITCH_NORM)
set_task(0.1,"hook_task",id,"",0,"ab")
hook_task(id)
func_break(id)
}
if( is_user_alive( id ) && get_pcvar_num( Glow ) )
{
if( is_user_alive( id ) && get_pcvar_num( GlowRandom ) )
{
set_user_rendering(id, kRenderFxGlowShell, random_num( 0,255 ), random_num( 0,255 ), random_num( 0,255 ), kRenderNormal, 16 )
}
else
{
set_user_rendering(id, kRenderFxGlowShell, ( get_pcvar_num( GlowR ) ), ( get_pcvar_num( GlowG ) ), ( get_pcvar_num( GlowB ) ), kRenderNormal, 16 )
}
}
}
else
{
ColorChat(id, RED, "^4[Нация Ножей] ^3Функция отключена!")
}
if( get_pcvar_num( Fade ) )
{
if( get_pcvar_num( FadeRandom ) )
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0}, id)
write_short( 10<<12 )
write_short( 10<<16 )
write_short( 1<<1 )
write_byte random_num( 0,255 )
write_byte random_num( 0,255 )
write_byte random_num( 0,255 )
write_byte( 255 )
message_end()
}
else
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0}, id)
write_short( 10<<12 )
write_short( 10<<16 )
write_short( 1<<1 )
write_byte ( get_pcvar_num( fadeR ) )
write_byte ( get_pcvar_num( fadeG ) )
write_byte ( get_pcvar_num( fadeB ) )
write_byte( 255 )
message_end()
}
}
return PLUGIN_HANDLED
}
// =================================================================================================
public is_hooked(id) {
return ishooked[id-1]
}
// =================================================================================================
public hook_off(id) {
remove_hook(id)
if( is_user_alive( id ) && get_pcvar_num( Glow ) )
{
set_user_rendering(id, kRenderFxGlowShell, random_num( 0,0 ), random_num( 0,0 ), random_num( 0,0 ), kRenderNormal, 16 )
}
if( get_pcvar_num( Fade ) )
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0}, id)
write_short( 10<<12 )
write_short( 10<<16 )
write_short( 1<<1 )
write_byte ( 255 )
write_byte ( 255 )
write_byte ( 255 )
write_byte( 255 )
message_end()
}
return PLUGIN_HANDLED
}
// =================================================================================================
public hook_task(id) {
if(!is_user_connected(id) || !is_user_alive(id))
remove_hook(id)
remove_beam(id)
f(id)
func_trail(id)
func_trail_ct(id)
new origin[3], Float:velocity[3]
get_user_origin(id,origin)
new distance = get_distance(hookorigin[id-1],origin)
//new Float:HSpeed = get_pcvar_float(HookSpeed)
if(distance > 25)
{
if(g_speed[id] == 0)
{
velocity[0] = (hookorigin[id-1][0] - origin[0]) * (4.0 * 100 / distance)
velocity[1] = (hookorigin[id-1][1] - origin[1]) * (4.0 * 100 / distance)
velocity[2] = (hookorigin[id-1][2] - origin[2]) * (4.0 * 100 / distance)
}else if(g_speed[id] == 1){
velocity[0] = (hookorigin[id-1][0] - origin[0]) * (4.0 * 200 / distance)
velocity[1] = (hookorigin[id-1][1] - origin[1]) * (4.0 * 200 / distance)
velocity[2] = (hookorigin[id-1][2] - origin[2]) * (4.0 * 200 / distance)
}else if(g_speed[id] == 2){
velocity[0] = (hookorigin[id-1][0] - origin[0]) * (4.0 * 300 / distance)
velocity[1] = (hookorigin[id-1][1] - origin[1]) * (4.0 * 300 / distance)
velocity[2] = (hookorigin[id-1][2] - origin[2]) * (4.0 * 300 / distance)
}
entity_set_vector(id,EV_VEC_velocity,velocity)
}
else {
entity_set_vector(id,EV_VEC_velocity,Float:{0.0,0.0,0.0})
remove_hook(id)
}
}
// =================================================================================================
public f(id)
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_BEAMENTPOINT);
write_short(id); //Индекс entity
write_coord(hookorigin[id-1][0]); //Конечная точка x
write_coord(hookorigin[id-1][1]); //Конечная точка y
write_coord(hookorigin[id-1][2]); //Конечная точка z
write_short(g_iBeamSprite); //Индекс спрайта
write_byte(0) //Стартовый кадр
write_byte(1); //Скорость анимации
write_byte(1); //Врмея существования
write_byte(40); //Толщина луча
write_byte(10); //Искажение
switch(random(2))
{
case 0:
{
write_byte(255); //Цвет красный
write_byte(0); //Цвеи зеленый
write_byte(0); //Цвет синий
}
case 1:
{
write_byte(0); //Цвет красный
write_byte(255); //Цвеи зеленый
write_byte(0); //Цвет синий
}
}
write_byte(2000); //Яркость
write_byte(0); //...
message_end();
}
// =================================================================================================
public func_break(id)
{
new origin[3]
get_user_origin(id,origin,3)
message_begin(MSG_ALL,SVC_TEMPENTITY,{0,0,0},id)
write_byte(TE_SPRITETRAIL) //Спрайт захвата
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2]+20)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2]+80)
write_short(model_gibs)
write_byte(20)
write_byte(20)
write_byte(4)
write_byte(20)
write_byte(10)
message_end()
}
// =================================================================================================
public func_trail(id)
if(cs_get_user_team(id) == CS_TEAM_T)
{
{
{
message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
write_byte (TE_BEAMFOLLOW)
write_short (id)
write_short (gTrail)
write_byte (TRAIL_LIFE)
write_byte (TRAIL_WIDTH)
write_byte (TRAIL_RED)
write_byte (TRAIL_GREEN)
write_byte (TRAIL_BLUE)
write_byte (TRAIL_BRIGTHNESS)
message_end()
}
}
}
public func_trail_ct(id)
if(cs_get_user_team(id) == CS_TEAM_CT)
{
{
{
message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
write_byte (TE_BEAMFOLLOW)
write_short (id)
write_short (gTrail)
write_byte (TRAIL_LIF)
write_byte (TRAIL_WIDT)
write_byte (TRAIL_RE)
write_byte (TRAIL_GREE)
write_byte (TRAIL_BLU)
write_byte (TRAIL_BRIGTHNES)
message_end()
}
}
}
// =================================================================================================
public remove_hook(id) {
if(task_exists(id))
remove_task(id)
remove_beam(id)
ishooked[id-1] = false
}
// =================================================================================================
public remove_beam(id) {
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte(99) // TE_KILLBEAM
write_short(id)
message_end()
}
Добрый вечер.
Непонятная для меня ошибка.
В чем дело?
Непонятная для меня ошибка.
В чем дело?
L 02/26/2018 - 15:51:13: Start of error session.
L 02/26/2018 - 15:51:13: Info (map "35hp_2") (file "addons/amxmodx/logs/error_20180226.log")
L 02/26/2018 - 15:51:13: [CSTRIKE] Invalid player 1
L 02/26/2018 - 15:51:13: [AMXX] Displaying debug trace (plugin "dm_hook.amxx", version "2.0")
L 02/26/2018 - 15:51:13: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 02/26/2018 - 15:51:13: [AMXX] [0] caf6b720cf298458dffb9fa8f9a92db1.sma::func_trail (line 454)
L 02/26/2018 - 15:51:13: [AMXX] [1] caf6b720cf298458dffb9fa8f9a92db1.sma::hook_task (line 352)
L 02/26/2018 - 15:51:13: [AMXX] [2] caf6b720cf298458dffb9fa8f9a92db1.sma::hook_on (line 260)
L 02/26/2018 - 15:51:13: Info (map "35hp_2") (file "addons/amxmodx/logs/error_20180226.log")
L 02/26/2018 - 15:51:13: [CSTRIKE] Invalid player 1
L 02/26/2018 - 15:51:13: [AMXX] Displaying debug trace (plugin "dm_hook.amxx", version "2.0")
L 02/26/2018 - 15:51:13: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 02/26/2018 - 15:51:13: [AMXX] [0] caf6b720cf298458dffb9fa8f9a92db1.sma::func_trail (line 454)
L 02/26/2018 - 15:51:13: [AMXX] [1] caf6b720cf298458dffb9fa8f9a92db1.sma::hook_task (line 352)
L 02/26/2018 - 15:51:13: [AMXX] [2] caf6b720cf298458dffb9fa8f9a92db1.sma::hook_on (line 260)
В этой теме было размещено решение! Перейти к решению.