AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Module: Rage (https://forums.alliedmods.net/showthread.php?t=179706)

Arkshine 03-05-2012 04:24

Re: Module: Rage
 
Yes, kind of obvious, but here a small explanation.
By setting m_iUnBalancedRounds to 1, it forces to call BalanceTeams().

PHP Code:

    [...]
    
int autoTeamBalance CVAR_GET_FLOAT"mp_autoteambalance" );
    
    if ( 
autoTeamBalance != && m_iUnBalancedRounds )
    {
        
BalanceTeams();
    }
    
    if ( 
m_iNumCT m_iNumTerrorist >= || m_iNumTerrorist m_iNumCT >= )
    {
        
m_iUnBalancedRounds++;
    }
    else
    {
        
m_iUnBalancedRounds 0;
    }
    
    if ( 
autoTeamBalance != && m_iUnBalancedRounds == )
    {
        
UTIL_ClientPrintAllprint_center"#Auto_Team_Balance_Next_Round" );
    }
    [...] 



But I'm not sure it's good idea, because I remember calling directly BalanceTeams() with orpheu when #Auto_Team_Balance_Next_Round is trieggered and it was not working properly.

micapat 03-05-2012 12:43

Re: Module: Rage
 
Hello Sir !

1 )

I have some errors when i try to install it with TakeDamage / FireBullet3.

HTML Code:

L 03/05/2012 - 18:19:38: Start of error session.
L 03/05/2012 - 18:19:38: Info (map "de_nuke") (file "addons/amxmodx/logs/error_20120305.log")
L 03/05/2012 - 18:19:38: [RAGE] Virtual function TakeDamage not registered
L 03/05/2012 - 18:19:38: [AMXX] Displaying debug trace (plugin "takedamage.amxx")
L 03/05/2012 - 18:19:38: [AMXX] Run time error 10: native error (native "RageGetFunctionFromClass")
L 03/05/2012 - 18:19:38: [AMXX]    [0] take_damage_example.sma::plugin_precache (line 13)
L 03/05/2012 - 18:19:40: [RAGE] Function "CBaseEntity::FireBullets3" not found in rage
L 03/05/2012 - 18:19:40: [AMXX] Displaying debug trace (plugin "firebullets.amxx")
L 03/05/2012 - 18:19:40: [AMXX] Run time error 10: native error (native "RageGetFunction")
L 03/05/2012 - 18:19:40: [AMXX]    [0] Untitled.sma::plugin_init (line 7)

Meta List

HTML Code:

[ 1] AMX Mod X        RUN  -    amxmodx_mm.dll    v1.8.1.3  ini  Start ANY 
 [ 2] Fun              RUN  -    fun_amxx.dll      v1.8.1.3  pl1  ANY  ANY 
 [ 3] CStrike          RUN  -    cstrike_amxx.dll  v1.8.1.3  pl1  ANY  ANY 
 [ 4] CSX              RUN  -    csx_amxx.dll      v1.8.1.3  pl1  ANY  ANY 
 [ 5] Rage            RUN  -    rage_amxx.dll    vBETA 1  pl1  ANY  ANY 
 [ 6] thiscall_Int__C  RUN  -    thiscall_int__cb  v1.0      pl5  ANY  ANY 
 [ 7] thiscall_Vector  RUN  -    thiscall_vector_  v1.0      pl5  ANY  ANY 
 [ 8] FakeMeta        RUN  -    fakemeta_amxx.dl  v1.8.1.3  pl1  ANY  ANY 
 [ 9] Engine          RUN  -    engine_amxx.dll  v1.8.1.3  pl1  ANY  ANY 
9 plugins, 9 running

Handlers are installed ( addons/rage/handlers )
TakeDamage is installed ( addons/rage/virtual_functions/mod )
CBaseEntity_FireBullets3 is installed ( addons/rage/functions/mod )

;rage is declared ( addons/amxmodx/configs/modules.ini ) ( useless ? )

2 )

Quote:

Originally Posted by Arkshine
Special types :
Code:
edict_s* : Edict
entvars_s* : Entvars
CBaseEntity* : CBaseEntity
CBase[...]* : CBaseEntity

And what about the structure "TraceResult" .. ? :3

"CBaseEntity" can be used instead of "CAK47" ? Just a confirmation.

3 ) Great Job Sir :D and i'm not gay :nono:

joaquimandrade 03-05-2012 12:48

Re: Module: Rage
 
1 ) Post:

rage errors
rage functions
rage modules
rage handlers

2 ) TraceResult is handled as a pointer if I remember correctly so do like if it were void*.

3) Thanks :twisted: and well you are French so you are at least 50%

Edit:

Quote:

"CBaseEntity" can be used instead of "CAK47" ? Just a confirmation.
Not only can but also should

Exolent[jNr] 03-05-2012 12:59

Re: Module: Rage
 
Another module I will not have the time to fully understand. *sigh*

On another note, looks great and good job.

micapat 03-05-2012 13:26

Re: Module: Rage
 
Ok I have some informations :U

I forgot to say that but it's a local server ( -> Windows ) on Czero.

rage errors

Errors:

Unable to get vtable information for 'CBaseEntity'
Unable to get vtable information for 'CGameRules'
Function 'CBaseEntity_FireBullets3' doesn't have identifiers for your mod
Virtual function 'TakeDamage' doesn't have offsets for your mod

rage functions and rage modules :

Nothing.

rage handlers :

Crash czero ..

I think that we localised the problem :C

joaquimandrade 03-05-2012 13:48

Re: Module: Rage
 
Quote:

Originally Posted by Exolent[jNr] (Post 1663209)
Another module I will not have the time to fully understand. *sigh*

On another note, looks great and good job.

Thanks fellow

Quote:

Originally Posted by micapat (Post 1663234)
Ok I have some informations :U

I forgot to say that but it's a local server ( -> Windows ) on Czero.

rage errors

Errors:

Unable to get vtable information for 'CBaseEntity'
Unable to get vtable information for 'CGameRules'
Function 'CBaseEntity_FireBullets3' doesn't have identifiers for your mod
Virtual function 'TakeDamage' doesn't have offsets for your mod

rage functions and rage modules :

Nothing.

rage handlers :

Crash czero ..

I think that we localised the problem :C

Ok good you find this problem. I forgot to create aliast stuff for Vtables.
Do the following:
Go to

"addons\rage\config\vtables"

and each file there called cstrike, clone it, call it czero, open it and rename the entry from czero to cs.

That should make it for the virtual function.
About "CBaseEntity_FireBullets3" arkshine will have to create a new signature.
About doing "rage handlers" crashing try again after having the files.

Edit:

and edit TakeDamage and clone cstrike identifiers and rename it czero. I will fix this for next version.

Arkshine 03-05-2012 14:10

Re: Module: Rage
 
Quote:

About "CBaseEntity_FireBullets3" arkshine will have to create a new signature.
No. Just tried and works fine. But duplicating cstrike identifiers and renaming to cezro, should be done.

micapat 03-05-2012 14:24

Re: Module: Rage
 
News :

rage functions

id: 0 , function 'CBaseEntity::FireBullets3', handler '5:13', library: 'mod' , offset: '0x78170'
id: 1 , virtual function 'TakeDamage', handler 'thiscall_Int__CBaseEntity_Entvars_Entvars_Fl oat_Int', classname 'player', library: 'mod' , offset: '0xa5210

rage errors

0.

rage handlers

Crash :O

--

CBaseEntity::FireBullets3 works nice !
But when I write "mkdir", nothing happens :0

joaquimandrade 03-05-2012 14:28

Re: Module: Rage
 
Quote:

Originally Posted by micapat (Post 1663276)
News :

rage functions

id: 0 , function 'CBaseEntity::FireBullets3', handler '5:13', library: 'mod' , offset: '0x78170'
id: 1 , virtual function 'TakeDamage', handler 'thiscall_Int__CBaseEntity_Entvars_Entvars_Fl oat_Int', classname 'player', library: 'mod' , offset: '0xa5210

rage errors

0.

rage handlers

Crash :O

--

CBaseEntity::FireBullets3 works nice !
But when I write "mkdir", nothing happens :0

I will check later on czero why the crash.
mkdir is not implemented. Try mkdmg

micapat 03-05-2012 14:33

Re: Module: Rage
 
Ok sorry it works too :crab:

Good Job !


All times are GMT -4. The time now is 05:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.