marks Error

Сообщения
271
Реакции
43
Помог
5 раз(а)
Ошибка
-->PLR SPAWN
--> get models/shoulder_marks/1.mdl for 0
L 03/19/2019 - 16:07:28: [ReAPI] get_member: unknown member id 126
L 03/19/2019 - 16:07:28: [AMXX] Displaying debug trace (plugin "aes_marks.amxx", version "0.1")
L 03/19/2019 - 16:07:28: [AMXX] Run time error 10: native error (native "get_member")
L 03/19/2019 - 16:07:28: [AMXX] [0] aes_marks.sma::get_bodyseq_for_player (line 109)
L 03/19/2019 - 16:07:28: [AMXX] [1] aes_marks.sma::Update_Marks (line 78)
L 03/19/2019 - 16:07:28: [AMXX] [2] aes_marks.sma::On_Player_Spawn (line 55)
ОС
Linux
Amx Mod X
AMX Mod X 1.10.0.5250 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Feb 11 2019 03:16:53
Built from: https://github.com/alliedmodders/amxmodx/commit/f623126
Build ID: 5250:f623126
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
ReGamedll
ReGameDLL version: 5.7.0.323-dev
Build date: 21:13:23 Feb 25 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/45fbb0
Версия 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
Список метамодулей
[ 1] Reunion      RUN   -    reunion_mm_i386.so   v0.1.0.133      ini  Start Never
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5250 ini Start ANY
[ 3] ReAPI RUN - reapi_amxx_i386.so v5.8.0.165-dev pl2 ANY Never
[ 4] MySQL RUN - mysql_amxx_i386.so v1.10.0.5250 pl2 ANY ANY
[ 5] Engine RUN - engine_amxx_i386.so v1.10.0.5250 pl2 ANY ANY
Список плагинов
[  1] Admin Base              1.10.0.525  AMXX Dev Team     admin.amxx       running
[ 2] Admin Commands 1.10.0.525 AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.10.0.525 AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.10.0.525 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.10.0.525 AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.10.0.525 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.10.0.525 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.10.0.525 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.10.0.525 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.10.0.525 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.10.0.525 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.10.0.525 AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.10.0.525 AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.10.0.525 AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.10.0.525 AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.10.0.525 AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.10.0.525 AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.10.0.525 AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.10.0.525 AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.10.0.525 AMXX Dev Team statscfg.amxx running
[ 21] CSStatsX SQL 0.7.4+1 serfreeman1337 csstatsx_sql.am running
[ 22] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 23] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 24] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 25] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 26] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 27] AES: Bonus CSTRIKE 0.5.9 [REA serfreeman1337/s aes_bonus_cstri running
[ 28] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
[ 29] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 30] AES: Shoulder Marks 0.1 serfreeman1337 aes_marks.amxx debug
Автор плагина
serfreeman1337
Версия плагина
0.1
Исходный код
#include <amxmodx>
#include <reapi>
#include <aes_v>

#define PLUGIN "AES: Shoulder Marks"
#define VERSION "0.1"
#define AUTHOR "serfreeman1337"

#define RANKS_AMOUNT 20
#define PRECACHE_DIR "models/shoulder_marks"
#define MARKS_CLASSNAME "aes_shoulder_marks"

new Array:marksModels, iMode[RANKS_AMOUNT]
new marksEntity[33],modelName[128]
new const m_iInternalModel = 126

public plugin_precache(){
new cLvlNum = register_cvar("aes_sm_lvlnum","20")

new precachePath[128]
marksModels = ArrayCreate(128)

for(new i ; i < get_pcvar_num(cLvlNum) ; ++i){
formatex(precachePath,127,"%s/%d.mdl",PRECACHE_DIR,i + 1)

if(file_exists(precachePath)){
precache_model(precachePath)
ArrayPushString(marksModels,precachePath)

server_print("--> %d %s",i,precachePath)
iMode[i] = precache_model(precachePath);
}else{
log_amx("cant locate %s file",precachePath)
ArrayPushString(marksModels,"")
}
}
}

public plugin_init(){
register_plugin(PLUGIN, VERSION, AUTHOR)

RegisterHookChain(RG_CBasePlayer_Spawn,"On_Player_Spawn",1)
RegisterHookChain(RG_CBasePlayer_Killed,"On_Player_Killed",1)
}

public aes_player_levelup(id)
Update_Marks(id)

public aes_player_leveldown(id)
Update_Marks(id)

public On_Player_Spawn(id){
server_print("-->PLR SPAWN")

Update_Marks(id)
}

public On_Player_Killed(id)
Hide_Marks(id)

public client_disconnected(id)
Hide_Marks(id)

public Update_Marks(id) {

if(!is_entity(marksEntity[id])) {

marksEntity[id] = rg_create_entity("info_target");
set_entvar(marksEntity[id], var_classname, MARKS_CLASSNAME);
}

ArrayGetString(marksModels,aes_get_player_level(id),modelName,127)
server_print("--> get %s for %d",modelName,aes_get_player_level(id))

if(!modelName[0])
return 0

new bodySeq = get_bodyseq_for_player(id)
server_print("--> get %d bodyseq",bodySeq)

if(!bodySeq)
return 0

set_entvar(marksEntity[id], var_aiment, id);
set_entvar(marksEntity[id], var_movetype, MOVETYPE_FOLLOW);
set_entvar(marksEntity[id], var_effects, get_member(marksEntity[id], var_effects) & ~EF_NODRAW);

//set_entvar(marksEntity[id], var_modelindex, iMode[id]);
set_entvar(marksEntity[id], var_modelindex, iMode[aes_get_player_level(id)-1]);
set_entvar(marksEntity[id], var_model, modelName);
set_entvar(marksEntity[id], var_body, bodySeq);

server_print("--> %d",bodySeq)

return 1
}

public Hide_Marks(id){
if(!is_entity(marksEntity[id]))
return 0

set_entvar(marksEntity[id], var_effects, get_entvar(marksEntity[id], var_effects) | EF_NODRAW);

return 1
}

get_bodyseq_for_player(id){

return get_member(id, m_iInternalModel);

}
-->PLR SPAWN
--> get models/shoulder_marks/1.mdl for 0
L 03/19/2019 - 16:07:28: [ReAPI] get_member: unknown member id 126
L 03/19/2019 - 16:07:28: [AMXX] Displaying debug trace (plugin "aes_marks.amxx", version "0.1")
L 03/19/2019 - 16:07:28: [AMXX] Run time error 10: native error (native "get_member")
L 03/19/2019 - 16:07:28: [AMXX] [0] aes_marks.sma::get_bodyseq_for_player (line 109)
L 03/19/2019 - 16:07:28: [AMXX] [1] aes_marks.sma::Update_Marks (line 78)
L 03/19/2019 - 16:07:28: [AMXX] [2] aes_marks.sma::On_Player_Spawn (line 55)
 
Сообщения
273
Реакции
424
Помог
5 раз(а)
Murz, такого члена в regamedll не существует m_iInternalModel, попробуй так
Код:
get_bodyseq_for_player(id){

-    return get_member(id, m_iInternalModel);
+    return get_member(id, m_iModelName);

}
Я так понял это попытка перевести старый код на reapi?
 
  • Нравится
Реакции: Murz
Сообщения
271
Реакции
43
Помог
5 раз(а)
Murz, такого члена в regamedll не существует m_iInternalModel, попробуй так
Код:
get_bodyseq_for_player(id){

-    return get_member(id, m_iInternalModel);
+    return get_member(id, m_iModelName);

}
Я так понял это попытка перевести старый код на reapi?
да

Код:
-->PLR SPAWN
--> get models/shoulder_marks/1.mdl for 0
--> get 3 bodyseq
L 03/19/2019 - 21:06:56: [AMXX] Displaying debug trace (plugin "aes_marks.amxx", version "0.1")
L 03/19/2019 - 21:06:56: [AMXX] Run time error 4: index out of bounds
L 03/19/2019 - 21:06:56: [AMXX]    [0] aes_marks.sma::Update_Marks (line 89)
L 03/19/2019 - 21:06:56: [AMXX]    [1] aes_marks.sma::On_Player_Spawn (line 55)
L 03/19/2019 - 21:07:00: "SSSS<1><STEAM_2:0:528959420><TERRORIST>" committed suicide with "world"
L 03/19/2019 - 21:07:00: World triggered "Round_Draw" (CT "0") (T "0")
L 03/19/2019 - 21:07:00: World triggered "Round_End"
L 03/19/2019 - 21:07:00: FATAL ERROR (shutting down): SV_HullForEntity: SOLID_BSP without MOVETYPE_PUSH
FATAL ERROR (shutting down): SV_HullForEntity: SOLID_BSP without MOVETYPE_PUSH
Segmentation fault
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Tue Mar 19 21:07:00 EET 2019: Server restart in 10 seconds
 
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
Murz, is your server always shutting down when the plugin is enabled? If not, did you try to disable the plugin to check if it's that plugin which makes your server shut down?
 
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
Try:

Код:
public Update_Marks(id) {
+    if(!is_user_connected(id))
+        return 0;

    if(!is_entity(marksEntity[id])) {

        marksEntity[id] = rg_create_entity("info_target");
        set_entvar(marksEntity[id], var_classname, MARKS_CLASSNAME);
    }
 
Последнее редактирование:
Сообщения
271
Реакции
43
Помог
5 раз(а)
same

-->PLR SPAWN
--> get models/shoulder_marks/1.mdl for 0
--> get 7 bodyseq
L 03/26/2019 - 17:27:42: [AMXX] Displaying debug trace (plugin "aes_marks.amxx", version "0.1")
L 03/26/2019 - 17:27:42: [AMXX] Run time error 4: index out of bounds
L 03/26/2019 - 17:27:42: [AMXX] [0] aes_marks.sma::Update_Marks (line 92)
L 03/26/2019 - 17:27:42: [AMXX] [1] aes_marks.sma::On_Player_Spawn (line 55)
player console > kill and server crash

L 03/26/2019 - 17:29:32: "SSSS<1><STEAM_2:0:528959420><CT>" committed suicide with "world"
L 03/26/2019 - 17:29:32: World triggered "Round_Draw" (CT "0") (T "0")
L 03/26/2019 - 17:29:32: World triggered "Round_End"
L 03/26/2019 - 17:29:32: FATAL ERROR (shutting down): SV_HullForEntity: SOLID_BSP without MOVETYPE_PUSH
FATAL ERROR (shutting down): SV_HullForEntity: SOLID_BSP without MOVETYPE_PUSH
Segmentation fault
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Tue Mar 26 17:29:32 EET 2019: Server restart in 10 seconds
no problem i will use with fakemeta

Код:
#include <amxmodx>
#include <fakemeta>
#include <reapi>
#include <aes_v>

#define PLUGIN "AES: Shoulder Marks"
#define VERSION "0.1"
#define AUTHOR "serfreeman1337"

#define PRECACHE_DIR "models/shoulder_marks"
#define MARKS_CLASSNAME "aes_shoulder_marks"

new Array:marksModels
new marksEntity[33],modelName[128]
new const m_iInternalModel = 126

public plugin_precache(){
    new cLvlNum = register_cvar("aes_sm_lvlnum","20")
    
    new precachePath[128]
    
    marksModels = ArrayCreate(128)
    
    for(new i ; i < get_pcvar_num(cLvlNum) ; ++i){
        formatex(precachePath,127,"%s/%d.mdl",PRECACHE_DIR,i + 1)
        
        if(file_exists(precachePath)){
            precache_model(precachePath)
            ArrayPushString(marksModels,precachePath)
            
            server_print("--> %d %s",i,precachePath)
        }else{
            log_amx("cant locate %s file",precachePath)
            ArrayPushString(marksModels,"")
        }
    }
}

public plugin_init(){
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    RegisterHookChain(RG_CBasePlayer_Spawn,"On_Player_Spawn",1)
    RegisterHookChain(RG_CBasePlayer_Killed,"On_Player_Killed",1)
}

public aes_player_levelup(id)
    Update_Marks(id)
    
public aes_player_leveldown(id)
    Update_Marks(id)

public On_Player_Spawn(id){
    server_print("-->PLR SPAWN")
    
    Update_Marks(id)
}
    
public On_Player_Killed(id)
    Hide_Marks(id)
    
public client_disconnected(id)
    Hide_Marks(id)

public Update_Marks(id){
    if(!pev_valid(marksEntity[id])){
        marksEntity[id] = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))
        set_pev(marksEntity[id],pev_classname,MARKS_CLASSNAME)
    }
    
    ArrayGetString(marksModels,aes_get_player_level(id),modelName,127)
    
    server_print("--> get %s for %d",modelName,aes_get_player_level(id))
    
    if(!modelName[0])
        return 0
    
    new bodySeq = get_bodyseq_for_player(id)
    
    server_print("--> get %d bodyseq",bodySeq)
    
    if(!bodySeq)
        return 0
    
    set_pev(marksEntity[id],pev_aiment,id)
    set_pev(marksEntity[id],pev_movetype,MOVETYPE_FOLLOW)
    set_pev(marksEntity[id],pev_effects,pev(marksEntity[id], pev_effects) & ~EF_NODRAW)
    
    engfunc(EngFunc_SetModel,marksEntity[id],modelName)
    set_pev(marksEntity[id],pev_body,bodySeq)
    
    server_print("--> %d",bodySeq)
    
    return 1
}

public Hide_Marks(id){
    if(!pev_valid(marksEntity[id]))
        return 0
        
    set_pev(marksEntity[id],pev(marksEntity[id],pev_effects) | EF_NODRAW)
        
    return 1
}

get_bodyseq_for_player(id){
    return get_pdata_int(id,m_iInternalModel)

}
 
Сообщения
1,420
Реакции
2,511
Помог
58 раз(а)
Murz, of course. There is a lot of changes you (or someone other) did without understanding how it works. For example, you can't change the model with var_model. is_entity is not the same as pev_valid (it's the same as pev_valid(ent) == 2).
 
Последнее редактирование:

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

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