Error plugin Team Grenade Trail

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
290
Реакции
28
Помог
2 раз(а)
Ошибка
Error plugin Team Grenade Trail
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5263 (http://www.amxmodx.org)
Билд
ReHLDS version: 3.7.0.698-dev
Build date: 10:14:22 Aug 19 2020 (2321)
Build from: https://github.com/dreamstalker/rehlds/commit/376bc15
ReGamedll
ReGameDLL version: 5.18.0.474-dev
Build date: 11:07:34 Jul 16 2020
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/efb06a7
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.92c ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5263 ini Start ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[10] ReAPI RUN - reapi_amxx_i386.so v5.16.0.198-dev pl5 ANY Never
[11] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl5 ANY ANY
[12] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl5 ANY Never
[13] Hide Cvars RUN - hidecvars_amxx_i386.so v1.0 pl5 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[15] Fun RUN - fun_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[16] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[17] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[18] Engine RUN - engine_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
[19] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5263 pl5 ANY ANY
19 plugins, 19 running
Список плагинов
[ 1] Lite Bans 2.2 neygomon lite_bans_off.a running
[ 2] Team Select 1.5.0 F@nt0M teamselect.amxx running
[ 3] Advanced Eliminate 0.1.5 Askhanar advanced_elimin running
[ 4] Force Gag 1.2 zorken zilla_gag.amxx running
[ 5] [SQL] Chat Manager 1.1.1-13 Mistrick chatmask.amxx running
[ 6] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 7] [ReAPI] Anti overflow 1.0 Some Author antioverflow.am running
[ 8] Damager 0.0.6 steelzzz damager.amxx running
[ 9] Advanced Mute 2.1 OciXCrom crx_advmute.amx running
[ 10] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 11] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 12] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 13] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 14] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 15] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 16] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
[ 17] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 18] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 19] Admin Load 3.9.3 Dev F@nt0M adminload.amxx running
[ 20] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 21] Lista admini (amx_who) cs.leaguec Kobra whobun.amxx running
[ 22] unknown unknown unknown flash.amxx running
[ 23] Team Transfer 2.1 UnFoRgIvEn transfer_chat.a running
[ 24] MOTD Commands 1.3 OciXCrom crx_motdcommand running
[ 25] Admin Commands 1.9.0.5241 AMXX Dev Team admincmd.amxx running
[ 26] Commands Menu 1.10.0.537 AMXX Dev Team cmdmenu.amxx running
[ 27] Menus Front-End 1.8.2 AMXX Dev Team menufront.amxx running
[ 28] SHOW IP + LAST IP 2.0 Alka + x amx_showip_last running
[ 29] Players Menu 1.7 neugomon players_menu.am running
[ 30] Pause Plugins 1.10.0.537 AMXX Dev Team pausecfg.amxx running
[ 31] Admin Help 1.10.0.537 AMXX Dev Team adminhelp.amxx running
[ 32] Plugin Menu 1.10.0.537 AMXX Dev Team pluginmenu.amxx running
[ 33] Admin Chat 1.8.1.3746 AMXX Dev Team adminchat.amxx running
[ 34] Private Message: Core 1.5 Denzer private_message debug
[ 35] Private Message: Loggi 1.3 Denzer private_message running
[ 36] Items Restrict 1.1 s1lent items_restrict. running
[ 37] Best Player MOTD 1.2.1 OciXCrom crx_bestplayer. running
[ 38] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 39] Advanced Spam Nick Cha 0.2 Fullserver advanced_spam_n running
[ 40] Multi-Lingual System 1.10.0.537 AMXX Dev Team multilingual.am running
[ 41] Language set 1.0 Kobra land2.amxx running
[ 42] Whatsapp_Group_Request 3.2 CrAzY MaN whatsapp_group_ running
[ 43] Quick and No Scope Det 1.2 EFFx QuickNoScopeD.a running
[ 44] SERVER TASKS 2.0 HATTRICK (HTTRCK server_tasks.am running
[ 45] Bet 2.2 Filip Vilicic bet.amxx running
[ 46] Stats Configuration 1.10.0.537 AMXX Dev Team statscfg.amxx running
[ 47] AFK Control ReNew 1.3 neygomon afk_control.amx running
[ 48] Style C4 Timer 3.0 OciXCrom crx_c4timer.amx running
[ 49] unknown unknown unknown pingfakeoutstan running
[ 50] unknown unknown unknown fake.amxx running
[ 51] Ultimele Harti 1.0 M@$t3r_@dy harti.amxx running
[ 52] CFG Slash 1.0 aNNakin cfg_slash.amxx running
[ 53] [ReAPI] TopRoundDamage 1.0.5 Dager* *.* -G- damage_round.am running
[ 54] Fall Damage HP Restore 0.0.1 Vaqtincha FallDamageHpRes running
[ 55] WeaponState Remember 0.0.4 Vaqtincha weaponstate_rem running
[ 56] Objective as GameName 1.1.1 CHEL74 obj_as_gamename running
[ 57] Admin Commands Log 1.2 w0w admin_commands_ running
[ 58] ResetScore 1.0 Leo_[BH] resetscore_reap running
[ 59] Reklama 09.07.2019 mx?! reklama.amxx running
[ 60] [ReAPI] Random Weapons 2.4.9 neugomon/h1k3 random_weapons_ running
[ 61] Simple Online Logger 23.05.19 mx?! simple_online_l running
[ 62] Trial Access 1.0.0 mx?! trial_access.am running
[ 63] Slap/Slay Team 1.0 Kobra slaylslapteam.a running
[ 64] VIP Menu [CS.AREA-GAME 0.15 Leo_[BH](tradus vip_reapi.amxx debug
[ 65] VIP NOU 1.0 test vampire.amxx running
[ 66] Night VIP 1.0 TBONTB vipfreenoaptea. running
[ 67] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 68] Check Vip 2.0 Leo_[BH] check.amxx running
[ 69] Slay Losers 1.1.6 [email protected] slay_losers.amx running
[ 70] Map Manager: Core 3.0.7 Mistrick map_manager_cor running
[ 71] Map Manager: Scheduler 0.1.5 Mistrick map_manager_sch running
[ 72] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv paused
[ 73] Map Manager: Nominatio 0.1.2 Mistrick map_manager_nom running
[ 74] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 75] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 76] Map Manager: Effects 0.0.9 Mistrick map_manager_eff running
[ 77] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 78] Map Manager: Advanced 0.0.5 Mistrick map_manager_adv running
[ 79] Map Manager: Online ch 1.0.0 Sergey Shorokhov map_manager_onl running
[ 80] FocusOnVotemap 1.2.1 Boec[SpecOPs] focus_on_votema running
[ 81] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 82] ReParachute 1.1 PurposeLess reparachute.amx running
[ 83] [ReAPI:AMXX] Buy Nades 0.2 F@nt0M Buy_Nades_Timeo debug
[ 84] Voiceserver Connect 1.1.015 Nextra voiceserver_con debug
[ 85] Hide 1.1 xPaw hidexpaw.amxx running
[ 86] M_AntiRusher 2.83 Miczu xPaw_Antirusher running
[ 87] Say Me And HP 1.0 Javekson say_me_hp.amxx running
[ 88] Save score & money 1.2.4 Minni Mouse Save_Score_and_ running
[ 89] Boost Server Payment 1.0 JazZ. boostsv.amxx running
[ 90] Hostname Timeleft 1.0 xPaw HostnameTimelef running
[ 91] [ReAPI] Block Fire in 3.1.0 F@nt0M reapi_block_fit running
[ 92] Christmas hat 0.3 AMXX.Shop christmas_hat_r running
[ 93] Team Grenade Trail 1.2 Numb team_grenade_tr debug
[ 94] MapBalance 1.0 BlackSignature MapBalance.amxx running
94 plugins, 93 running
Автор плагина
Numb
Версия плагина
1.2
Исходный код
/**
*
* Team Grenade Trail
* by Numb
*
*
* Description
* This plugin adds a trail after the grenade. Each type of grenade has an unique
* color what can be changed by cvar. Unlike other grenade trail plugins, this one
* has two major differences. First is that trails are actually made out of arrows
* what show direction in what grenade is moving (so now if you came out of corner
* and see a trail - you can instantly tell where to expect grenade to be). Second
* and most important one is that by default only team mates can see trails of your
* thrown grenades (this gives you and your team mates advantage from misunderstandings
* - no more guessing did any of those 10 noobs behind you thrown flashes or what;
* but when it comes to enemy grenades - you still must spot the model of the grenade
* to see and identify grenade type).
*
*
* Requires:
* CSStats
* VexdUM
*
*
* Cvars:
*
* + "amx_grentrail_status" - who can see the trail.
* - "0" - plugin disabled.
* - "1" - only team. [default]
* - "2" - team and everyone who's dead.
* - "3" - everyone.
*
* + "amx_grentrail_color_he" - explosive trail color [rrrgggbbb].
* - "255063000" - red 255; 63 green; 0 blue [default].
*
* + "amx_grentrail_color_fb" - flashbang trail color [rrrgggbbb].
* - "000255255" - red 0; 255 green; 255 blue [default].
*
* + "amx_grentrail_color_sg" - smokegren trail color [rrrgggbbb].
* - "031255127" - red 31; 255 green; 127 blue [default].
*
* + "amx_grentrail_team_color" - extra trail line with owners team color.
* - "1" - enabled.
* - "0" - disabled. [default]
*
*
* Additional info:
* Tested in Counter-Strike 1.6 with AMX Mod 2010.1.
*
*
* Credits:
* Original idea came from AssKicR's ( http://forums.alliedmods.net/member.php?u=261 )
* plugin ( http://forums.alliedmods.net/showthread.php?p=19096 ) what was published in
* 2004/May/05. Method of showing trails taken from jim_yang's
* ( http://forums.alliedmods.net/member.php?u=19661 ) plugin
* ( http://forums.alliedmods.net/showthread.php?t=50171 ) what was published in 2007/Jan/21.
*
*
* Change-Log:
*
* + 1.2
* - Added: Support for team color trail (this is another smaller trail what has no effect on the main one).
* - Changed: Improved plugin performance.
* - Changed: Renamed "amx_grentrail_team" cvar to "amx_grentrail_status".
* - Changed: Renamed "amx_grentrail_color_sm" cvar to "amx_grentrail_color_sg".
*
* + 1.1
* - Fixed: An issue with team detection once player team was changed by some custom plugin.
*
* + 1.0
* - First release.
*
*
* Downloads:
* http://www.amxmod.net
*
**/

// ----------------------------------------- CONFIG START -----------------------------------------

// If you are having problems, that not everyone who should see the trail is seeing them, that can
// be due to message type and ping. Using "MSG_ONE_UNRELIABLE" and "MSG_BROADCAST" is better for server
// stability, however using "MSG_ONE" and "MSG_ALL" garanties that client will recieve the update.
#define MSG_TYPE_ALONE MSG_ONE // default: (uncommented)
//#define MSG_TYPE_ALONE MSG_ONE_UNRELIABLE // default: (commented)
#define MSG_TYPE_ALL MSG_ALL // default: (uncommented)
//#define MSG_TYPE_ALL MSG_BROADCAST // default: (commented)

// ------------------------------------------ CONFIG END ------------------------------------------

#include <amxmod>
#include <csstats>
#include <VexdUM>

#define PLUGIN_NAME "Team Grenade Trail"
#define PLUGIN_VERSION "1.2"
#define PLUGIN_AUTHOR "Numb"

#define SetPlayerBit(%1,%2) ( %1 |= ( 1 << ( %2 & 31 ) ) )
#define ClearPlayerBit(%1,%2) ( %1 &= ~( 1 << ( %2 & 31 ) ) )
#define CheckPlayerBit(%1,%2) ( %1 & ( 1 << ( %2 & 31 ) ) )

#define CS_TEAM_T 1
#define CS_TEAM_CT 2
#define cs_get_user_team(%1) get_offset_int(%1, 114)

new g_iCvar_ColorHe;
new g_iCvar_ColorFlash;
new g_iCvar_ColorSmoke;
new g_iCvar_TrailStatus;
new g_iCvar_TeamColor;

new g_iSpriteLine;
new g_iSpriteArrow;

new g_iConnectedUsers;
new g_iDeadUsers;
new g_iMaxPlayers;

public plugin_precache()
{
g_iSpriteArrow = precache_model("sprites/arrow1.spr");
g_iSpriteLine = precache_model("sprites/smoke.spr");
}

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

g_iCvar_TrailStatus = register_cvar("amx_grentrail_status", "1");

g_iCvar_ColorHe = register_cvar("amx_grentrail_color_he", "255063000");
g_iCvar_ColorFlash = register_cvar("amx_grentrail_color_fb", "000255255");
g_iCvar_ColorSmoke = register_cvar("amx_grentrail_color_sg", "031255127");

g_iCvar_TeamColor = register_cvar("amx_grentrail_team_color", "0");

register_event("ResetHUD", "Event_ResetHUD", "be");
register_event("Health", "Event_Health", "bd", "1=0");

g_iMaxPlayers = clamp(get_maxplayers(), 1, 32);
}

public client_connect(iPlrId)
{
ClearPlayerBit(g_iConnectedUsers, iPlrId);
ClearPlayerBit(g_iDeadUsers, iPlrId);
}

public client_putinserver(iPlrId)
{
if( !is_user_bot(iPlrId) )
{
SetPlayerBit(g_iConnectedUsers, iPlrId);
if( is_user_alive(iPlrId) )
ClearPlayerBit(g_iDeadUsers, iPlrId);
else
SetPlayerBit(g_iDeadUsers, iPlrId);
}
}

public client_disconnect(iPlrId)
{
ClearPlayerBit(g_iConnectedUsers, iPlrId);
ClearPlayerBit(g_iDeadUsers, iPlrId);
}

public Event_ResetHUD(iPlrId)
{
if( CheckPlayerBit(g_iConnectedUsers, iPlrId) )
{
ClearPlayerBit(g_iDeadUsers, iPlrId);
}
}

public Event_Health(iPlrId)
{
if( CheckPlayerBit(g_iConnectedUsers, iPlrId) )
{
SetPlayerBit(g_iDeadUsers, iPlrId);
}
}

public grenade_throw(iPlrId, iGrenId, iWeaponType)
{
new iTrailStatus = clamp(get_cvarptr_num(g_iCvar_TrailStatus), 0, 3);

if( iTrailStatus == 0 )
return;

new iTemp;
switch( iWeaponType )
{
case CSW_HEGRENADE: iTemp = get_cvarptr_num(g_iCvar_ColorHe);
case CSW_FLASHBANG: iTemp = get_cvarptr_num(g_iCvar_ColorFlash);
case CSW_SMOKEGRENADE: iTemp = get_cvarptr_num(g_iCvar_ColorSmoke);
default: return;
}

new iRed = iTemp/1000000;
iTemp %= 1000000;
new iGreen = iTemp/1000;
new iBlue = iTemp%1000;

iTemp = clamp(get_cvarptr_num(g_iCvar_TeamColor), 0, 1);

switch( iTrailStatus )
{
case 1:
{
new iOwnerTeam = cs_get_user_team(iPlrId);

for( new iPlayer=1; iPlayer<=g_iMaxPlayers; iPlayer++ )
{
if( CheckPlayerBit(g_iConnectedUsers, iPlayer) )
{
if( cs_get_user_team(iPlayer)==iOwnerTeam )
{
message_begin(MSG_TYPE_ALONE, SVC_TEMPENTITY, _, iPlayer);
write_byte(TE_BEAMFOLLOW);
write_short(iGrenId);
write_short(g_iSpriteArrow);
write_byte(15);
write_byte(7);
write_byte(iRed);
write_byte(iGreen);
write_byte(iBlue);
write_byte(191);
message_end();

if( iTemp )
{
message_begin(MSG_TYPE_ALONE, SVC_TEMPENTITY, _, iPlayer);
write_byte(TE_BEAMFOLLOW);
write_short(iGrenId);
write_short(g_iSpriteLine);
write_byte(15);
write_byte(1);
switch( iOwnerTeam )
{
case CS_TEAM_T:
{
write_byte(255);
write_byte(0);
write_byte(0);
}
case CS_TEAM_CT:
{
write_byte(0);
write_byte(0);
write_byte(255);
}
default:
{
write_byte(127);
write_byte(127);
write_byte(127);
}
}
write_byte(191);
message_end();
}
}
}
}
}
case 2:
{
new iOwnerTeam = cs_get_user_team(iPlrId);

for( new iPlayer=1; iPlayer<=g_iMaxPlayers; iPlayer++ )
{
if( CheckPlayerBit(g_iConnectedUsers, iPlayer) )
{
if( CheckPlayerBit(g_iDeadUsers, iPlayer) || cs_get_user_team(iPlayer)==iOwnerTeam )
{
message_begin(MSG_TYPE_ALONE, SVC_TEMPENTITY, _, iPlayer);
write_byte(TE_BEAMFOLLOW);
write_short(iGrenId);
write_short(g_iSpriteArrow);
write_byte(15);
write_byte(7);
write_byte(iRed);
write_byte(iGreen);
write_byte(iBlue);
write_byte(191);
message_end();

if( iTemp )
{
message_begin(MSG_TYPE_ALONE, SVC_TEMPENTITY, _, iPlayer);
write_byte(TE_BEAMFOLLOW);
write_short(iGrenId);
write_short(g_iSpriteLine);
write_byte(15);
write_byte(1);
switch( iOwnerTeam )
{
case CS_TEAM_T:
{
write_byte(255);
write_byte(0);
write_byte(0);
}
case CS_TEAM_CT:
{
write_byte(0);
write_byte(0);
write_byte(255);
}
default:
{
write_byte(127);
write_byte(127);
write_byte(127);
}
}
write_byte(191);
message_end();
}
}
}
}
}
case 3:
{
message_begin(MSG_TYPE_ALL, SVC_TEMPENTITY);
write_byte(TE_BEAMFOLLOW);
write_short(iGrenId);
write_short(g_iSpriteArrow);
write_byte(15);
write_byte(7);
write_byte(iRed);
write_byte(iGreen);
write_byte(iBlue);
write_byte(191);
message_end();

if( iTemp )
{
message_begin(MSG_TYPE_ALL, SVC_TEMPENTITY);
write_byte(TE_BEAMFOLLOW);
write_short(iGrenId);
write_short(g_iSpriteLine);
write_byte(15);
write_byte(1);
switch( cs_get_user_team(iPlrId) )
{
case CS_TEAM_T:
{
write_byte(255);
write_byte(0);
write_byte(0);
}
case CS_TEAM_CT:
{
write_byte(0);
write_byte(0);
write_byte(255);
}
default:
{
write_byte(127);
write_byte(127);
write_byte(127);
}
}
write_byte(191);
message_end();
}
}
}
}
L 12/20/2020 - 03:22:55: [AMXX] Displaying debug trace (plugin "team_grenade_trail.amxx", version "1.2")
L 12/20/2020 - 03:22:55: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 12/20/2020 - 03:22:55: [AMXX] [0] 84364.attach::grenade_throw (line 234)
L 12/20/2020 - 03:23:00: [CSTRIKE] Invalid player 14 (not in-game)



I suppose it has an easy fix but I'm far from being a scripter :(
 
В этой теме было размещено решение! Перейти к решению.
Последнее редактирование:
Сообщения
17
Реакции
18
Помог
2 раз(а)
Maybe I am blind, but exactly is the error?
 
Сообщения
3,582
Реакции
1,570
Помог
137 раз(а)
Точно ли ошибка на 234 строке? В прикреплённом файле на этой строке другой код.
 
Сообщения
290
Реакции
28
Помог
2 раз(а)
Sorry , that was another version,here's the correct version . Thank you !
 

Вложения

Сообщения
3,582
Реакции
1,570
Помог
137 раз(а)
Try 232 line
Код:
-if( CheckPlayerBit(g_iConnectedUsers, iPlayer) )
+if(is_user_connected(iPlayer))
 
Сообщения
25
Реакции
7
Ненормативная лексика
Poor dumb people who still do not get that amxmod.net's plugins are not for that AMX Mod X thing, despite the huge amount of informations about that.
 
Статус
В этой теме нельзя размещать новые ответы.

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

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