Transformation Data

NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
I wanted to ask whether the game checks player's powerlevel before letting him succeed in using "ascend" command or there's pdata which is set to allow player to transform after he gained a specific amount of powerlevel?

Like if powerlevel is below 1.000.000, "ascend" is ignored.
If powerlevel is above 1.000.000, "ascend" is succeeded.

OR

If powerlevel is below 1.000.000, ascend = false.
If powerlevel is above 1.000.000, ascend = true.
After executing "ascend" command, if ascend = true, continue trans, else ignore.

So which is it? If the 2nd, I'd like to know the pdata number.
 
Freelance Mappzor
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Nov 21, 2003
Messages
17,065
Best answers
0
Location
Stairing at the Abyss
I believe its in the button "ascend" pressed function.

Basically the thing that gets called up when you press the ascend button.
 
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
I'm asking how does the game determine if player can transform or not. Checks player's PL or a variable (which depends on PL)?
 
Freelance Mappzor
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Nov 21, 2003
Messages
17,065
Best answers
0
Location
Stairing at the Abyss
I think it checks for the transform PL variable.

Since it allso does % calculations for the transformation length.
 
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
So can I set transform variable to true even if the players doesn't have enough PL to transform?
 
Freelance Mappzor
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Nov 21, 2003
Messages
17,065
Best answers
0
Location
Stairing at the Abyss
The transform variable beeing the powerlevel ofcourse ^^
 
ESF Coder
🌠 Staff
Joined
Jun 13, 2004
Messages
585
Best answers
0
Location
Austria -> Vienna
are you talking about 1.2.3 or 1.3?
as for esf 1.2.3 there was a call to m_pClass->GetTransformationPL()
in 1.3 there is something similiar with the difference, that it is a value in the hashmap

//edit
anyways: there is no real way to get access to this values via amxx ( well if you write your own module in c++ then it would be possible )
 
Last edited:
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
It's for 1.2.3. I was hoping to find a way to allow player to transform whenever he wants and that the transformation wouldn't depend on PL. I made this:
Code:
#include <amxmodx>
#include <fakemeta>
 
#define OFFSET_POWERLEVEL 460
#define EXTRAOFFSET 5
 
new g_ClassTransPL[] =
{
        0,
        3000000, // Buu
        1750000, // Goku
        1000000, // Gohan
        3000000, // Krillin
        1800000, // Frieza
        1650000, // Piccolo
        1000000, // Trunks
        2000000, // Vegeta
        1900000  // Cell
};
 
public plugin_init()
        register_clcmd("ascend", "AllowTrans");
 
public AllowTrans(Cl)
{
        new Data[2], ClassTransPL;
        Data[1] = get_pdata_int(Cl, OFFSET_POWERLEVEL, EXTRAOFFSET);
        ClassTransPL = g_ClassTransPL[pev(Cl, pev_playerclass)];
 
        // Can player already transform?
        if (Data[1] >= ClassTransPL)
                return;
 
        Data[0] = Cl;
        set_pdata_int(Cl, OFFSET_POWERLEVEL, ClassTransPL, EXTRAOFFSET);
        set_task(0.1, "ResetPreviousPL", _, Data, 2);
}
 
public ResetPreviousPL(Data[])
        set_pdata_int(Data[0], OFFSET_POWERLEVEL, Data[1], EXTRAOFFSET);
But now player can use abuse "ascend" command (not sure for what reason). I guess I'll have to check "descend" command and the death of a player.

EDIT: Can't I access m_pClass by get_pdata_cbase()? You can access many (if not all) members by get_pdata_cbase() for Counter-Strike.

EDIT2: Can I somehow check if player is ascended and automatically descended? Or is it also a member like m_pClass?
Also IMO I can use "ResetHUD" event for player's spawn to avoid using Ham Sandwich module only for that, because blocking "fullupdate" command is a good idea in ESF. After using a "fullupdate" command, you can no longer change the attacks, the image of the attacks never appears (like a few seconds after spawn).
 
Last edited:

Users who are viewing this thread

Top Bottom