[Release] God Mode Aura and Fix Vehicle Hits

Results 1 to 1 of 1
  1. #1
    Yuri-BR#1559 Yuri-BR is offline
    DeveloperRank
    Apr 2013 Join Date
    ☣️❤️Location
    1,040Posts

    [Release] God Mode Aura and Fix Vehicle Hits



    Simple fix to vehicle hits while with god mode enabled and aura for god mode command








    WarZ_Server.sln

    Spoiler:

    Search for:

    Spoiler:
    PHP Code:
    if(strncmp(cmd"/god"4) == && plr->profile_.ProfileData.isDevAccount wiUserProfile::DAA_GOD)
    {
        
    plr->m_isAdmin_GodMode true// once turned on, you cannot disable it (to prevent abuse)
        
    return 0;



    Change to:

    Spoiler:
    PHP Code:
    if(strncmp(cmd"/god"4) == && plr->profile_.ProfileData.isDevAccount wiUserProfile::DAA_GOD// By Yuri-BR
    {
        
    plr->m_isAdmin_GodMode = !plr->m_isAdmin_GodMode// once turned on, you cannot disable it (to prevent abuse)
        
        
    PKT_C2C_ChatMessage_s n2;
        
    n2.msgChannel 1;
        
    n2.userFlag   2;
        
    r3dscpy(n2.gamertag"<SYSTEM>");
        
    r3dscpy(n2.msgplr->m_isAdmin_GodMode "GodMode ON" "God Mode OFF");
        
    p2pSendToPeer(plr->peerId_plr, &n2sizeof(n2));
        
        
    PKT_S2C_GodMode_s n;
        
    n.isGodModeOn plr->m_isAdmin_GodMode;
        
    p2pBroadcastToActive(plr, &nsizeof(n));
        
        return 
    0;




    WarZ.sln

    Spoiler:

    Search for:

    Spoiler:
    PHP Code:
    PKT_S2C_MoveTeleport


    Add:

    Spoiler:
    PHP Code:
    PKT_S2C_GodMode,// By Yuri-BR 


    Search for:

    Spoiler:
    PHP Code:
    struct PKT_S2C_MoveTeleport_s : public DefaultPacketMixin<PKT_S2C_MoveTeleport>
    {
        ...
    }; 


    Add:

    Spoiler:
    PHP Code:
    struct PKT_S2C_GodMode_s : public DefaultPacketMixin<PKT_S2C_GodMode>// By Yuri-BR
    {
        
    bool    isGodModeOn;
    }; 



    Search for:

    Spoiler:
    PHP Code:
    isFlashlightOn(true


    Add:

    Spoiler:
    PHP Code:
    m_isAdmin_GodMode(false)// By Yuri-BR 



    Search for:

    Spoiler:
    PHP Code:
    if(r3dGetTime() < m_SpawnProtectedUntil && m_AuraType != AT_SPAWNPROTECTION)
        
    m_AuraType AT_SPAWNPROTECTION;
    else if(
    r3dGetTime() > m_SpawnProtectedUntil && m_AuraType == AT_SPAWNPROTECTION)
        
    m_AuraType AT_NONE


    Change to:

    Spoiler:
    PHP Code:
    bool isSpawnProtect r3dGetTime() < m_SpawnProtectedUntil// By Yuri-BR
    if(isSpawnProtect)// By Yuri-BR
    {
        if(
    m_isAdmin_GodMode)
            
    m_AuraType AT_GODMODE;
        else
            
    m_AuraType AT_SPAWNPROTECTION;
    }
    else
    {
        if(
    m_isAdmin_GodMode)
            
    m_AuraType AT_GODMODE;
        else
            
    m_AuraType AT_NONE;




    Search for:

    Spoiler:
    PHP Code:
    void obj_Player::OnNetPacket(const PKT_S2C_MoveTeleport_sn)
    {
        ...



    Add:

    Spoiler:
    PHP Code:
    void obj_Player::OnNetPacket(const PKT_S2C_GodMode_sn)// By Yuri-BR
    {
        
    m_isAdmin_GodMode n.isGodModeOn;



    Search for:

    Spoiler:
    PHP Code:
    DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_S2C_MoveTeleport); 


    Add:

    Spoiler:
    PHP Code:
    DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_S2C_GodMode);// By Yuri-BR 


    Search for:

    Spoiler:
    PHP Code:
    else if(This->PlayerAuraType == obj_Player::AT_SPAWNPROTECTION// golden color
    {
        
    1.0f ;
        
    0.62f ;
        
    0.15f ;



    Add:

    Spoiler:
    PHP Code:
    else if(This->PlayerAuraType == obj_Player::AT_GODMODE)// By Yuri-BR
    {
        
    1.0f ;
        
    0.0f ;
        
    0.0f ;



    Search for:

    Spoiler:
    PHP Code:
    if (distance 10.0f || vehicleSpeed 8.0f || isHitByVehicle || (this->GroupID != && this->GroupID == gClientLogic().localPlayer_->GroupID) || m_AuraType == AT_SPAWNPROTECTION || CurLoadout.Health == 0


    Add:

    Spoiler:
    PHP Code:
    if (distance 10.0f || vehicleSpeed 8.0f || isHitByVehicle || (this->GroupID != && this->GroupID == gClientLogic().localPlayer_->GroupID) || m_AuraType == AT_SPAWNPROTECTION || CurLoadout.Health == || m_isAdmin_GodMode// fix vehicle hits the player with god mode by Yuri-BR 


    Search for:

    Spoiler:
    PHP Code:
    AT_SPAWNPROTECTION


    Add:

    Spoiler:
    PHP Code:
    AT_GODMODE,// By Yuri-BR 


    Search for:

    Spoiler:
    PHP Code:
    float m_AuraTransarency


    Add:

    Spoiler:
    PHP Code:
    bool        m_isAdmin_GodMode;// By Yuri-BR 


    Search for:

    Spoiler:
    PHP Code:
    void             OnNetPacket(const PKT_S2C_MoveTeleport_sn); 


    Add:

    Spoiler:
    PHP Code:
    void             OnNetPacket(const PKT_S2C_GodMode_sn);// By Yuri-BR 




    Example of how to use: /god
    Last edited by Yuri-BR; 11-04-20 at 12:45 PM.




Advertisement