Raised This Month: $51 Target: $400
 12% 

[CS:GO] Nav Area Utilities (v1.02 8/2/2018)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Rachnus
Senior Member
Join Date: Jun 2016
Location: Funland
Plugin ID:
6210
Plugin Version:
v1.02
Plugin Category:
Technical/Development
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Easier way of messing around with nav areas in csgo
    Old 07-31-2018 , 05:43   [CS:GO] Nav Area Utilities (v1.02 8/2/2018)
    Reply With Quote #1

    Nav Area Utilities v1.02


    Description:
    An easier way to mess around with nav areas.
    yoink

    Commands:
    Quote:
    sm_naucount - Prints amount of nav areas on the current map
    sm_nauarea - Visualizes a nav area/ladder. (sm_nauarea <navareaindex(optional)> <showneighbours(0-1)>
    Previews:





    Include:
    PHP Code:
    #if defined _navareautilities_included
     #endinput
    #endif
    #define _navareautilities_included

    #define NAU_PREFIX " \x09[\x04Nav UTIL\x09]"

    #define NAU_GAMEDATA "navareautilities.gamedata"

    #define NAU_VERSION "1.02"

    #define NAU_NAVAREA_PARENT 0x7C

    #define NAU_NAVAREA_SOUTH_NAV_CONNECT_VECTOR 0x5C

    #define NAU_NAVAREA_LADDER_INDICATOR 0x34

    #define NAU_NAVAREA_LADDER_HEIGHT 0x18
    #define NAU_NAVAREA_LADDER_WIDTH 0x1C

    #define NAU_NAVAREA_LADDER_NAVAREAS 0x20

    enum NavDirType
    {
        
    NAVDIR_SOUTH =             0,
        
    NAVDIR_EAST =             1,
        
    NAVDIR_NORTH =             2,
        
    NAVDIR_WEST =             3,
        
    NAVDIR_UP =                4,
        
    NAVDIR_DOWN =            5,
        
        
    NAVDIR_MAX
    }

    enum NavLadderDestination
    {
        
    NAVLADDER_TOP_FORWARD 0,
        
    NAVLADDER_TOP_LEFT =     1,
        
    NAVLADDER_TOP_RIGHT =     2,
        
    NAVLADDER_TOP_BEHIND =     3,
        
    NAVLADDER_BOTTOM =        4,
        
        
    NAVLADDER_MAX
    }

    /**
     * Returns amount of nav areas
     * @return int         amount of nav areas
     */
    native int NAU_GetNavAreaCount();

    /**
     * Returns an address of a navareaindex
     * @return address         address of nav area
     */
    native CNavArea NAU_GetNavAreaAddressByIndex(int navAreaIndex);

    /**
     * Called when nav areas are loaded by plugin (OnMapStart)
     * @param amount of nav areas found
     * @noreturn
     */
    forward void NAU_OnNavAreasLoaded();

    methodmap CNavArea
    {
        
    /**
         * Returns the north west corner of the nav area
         * @param buffer to store the position
         * @return void
         */
        
    public void GetNorthWestCorner(float result[3])
        {
            
    result[0] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(4), NumberType_Int32));
            
    result[1] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(8), NumberType_Int32));
            
    result[2] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(12), NumberType_Int32));
        }
        
        
    /**
         * Returns the south east corner of the nav area
         * @param buffer to store the position
         * @return void
         */
        
    public void GetSouthEastCorner(float result[3])
        {
            
    result[0] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(16), NumberType_Int32));
            
    result[1] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(20), NumberType_Int32));
            
    result[2] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(24), NumberType_Int32));
        }
        
        
    /**
         * Get the parent nav area
         * @return address        address of the parent nav area
         */
        
    public CNavArea GetParent()
        {
            
    Address navParent =    view_as<Address>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(NAU_NAVAREA_PARENT), NumberType_Int32));
            return 
    view_as<CNavArea>(LoadFromAddress(navParentNumberType_Int32));
        }
        
        
    /**
         * Get the amount of nav areas in direction
         * @param direction
         * @return int        Amount of neighbours in direction
         */
        
    public int GetNeighbourCount(NavDirType direction)
        {
            
    Address navConnectVector =    view_as<Address>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(NAU_NAVAREA_SOUTH_NAV_CONNECT_VECTOR + (0x4 view_as<int>(direction))), NumberType_Int32));
            return 
    LoadFromAddress(navConnectVectorNumberType_Int32);
        }
        
        
    /**
         * Get address of a neighbour nav area
         * @param direction
         * @param neighbour index
         * @return address         address of the neighbour nav area
         */
        
    public CNavArea GetNeighbour(NavDirType directionint directionListIndex)
        {
            
    Address navConnectVector =    view_as<Address>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(NAU_NAVAREA_SOUTH_NAV_CONNECT_VECTOR + (0x4 view_as<int>(direction))), NumberType_Int32));
            return 
    view_as<CNavArea>(LoadFromAddress(navConnectVector view_as<Address>(0x4 + (0x8 view_as<int>(directionListIndex))), NumberType_Int32));
        }
        
        
    /**
         * Hacky way to find out if the nav area a CNavLadder or CNavArea
         * @return bool     if ladder area or not
         */
        
    public bool IsNavLadder()
        {
            
    int hack view_as<int>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(NAU_NAVAREA_LADDER_INDICATOR), NumberType_Int32));
            return 
    hack == -1;
        }
        
        public 
    bool IsNullPointer()
        {
            return 
    view_as<Address>(this) <= Address_Null;
        }
        
        
    /**
         * Returns the center position of the nav area
         * @param buffer to store the position
         * @return void
         */
        
    public void GetCenter(float result[3])
        {
            
    float nwCorner[3], seCorner[3];
            
    this.GetNorthWestCorner(nwCorner);
            
    this.GetSouthEastCorner(seCorner);
            
            
    NAU_GetMiddleOfABox(nwCornerseCornerresult);
        }
        
        
    /**
         * Returns wether or not the entity has larger X/Y values than the nav area
         * @param entity index
         * @return bool        can entity fit in nav area
         */
        
    public bool CanEntityFit(int entity)
        {
            
    float mid[3], vMins[3], vMaxs[3];
            
    GetEntPropVector(entityProp_Data"m_vecMins"vMins);
            
    GetEntPropVector(entityProp_Data"m_vecMaxs"vMaxs);
            
            
    mid[0] /= 2.0;
            
    mid[1] /= 2.0;
            
    mid[2] /= 2.0;
            
            if(
    mid[0] < 0.0mid[0] *= -1;
            if(
    mid[1] < 0.0mid[1] *= -1;
            if(
    mid[2] < 0.0mid[2] *= -1;
            
            
    float nwCorner[3], seCorner[3], navAreaMid[3];
            
    this.GetNorthWestCorner(nwCorner);
            
    this.GetSouthEastCorner(seCorner);
            
            
    MakeVectorFromPoints(seCornernwCornernavAreaMid);
            
            
    navAreaMid[0] /= 2.0;
            
    navAreaMid[1] /= 2.0;
            
    navAreaMid[2] /= 2.0;
            
            if(
    navAreaMid[0] < 0.0navAreaMid[0] *= -1;
            if(
    navAreaMid[1] < 0.0navAreaMid[1] *= -1;
            if(
    navAreaMid[2] < 0.0navAreaMid[2] *= -1;
            
            return (
    mid[0] <= navAreaMid[0] && mid[1] <= navAreaMid[1]);
        }
        
        
    /**
         * Returns wether or not the entity has larger X/Y values than the nav area
         * @param Mins of box
         * @param Maxs of box
         * @return bool        can entity fit in nav area
         */
        
    public bool CanFit(float vMins[3], float vMaxs[3])
        {
            
    float mid[3];
            
    MakeVectorFromPoints(vMinsvMaxsmid);
            
    mid[0] /= 2.0;
            
    mid[1] /= 2.0;
            
            if(
    mid[0] < 0.0mid[0] *= -1;
            if(
    mid[1] < 0.0mid[1] *= -1;
            
            
    float nwCorner[3], seCorner[3], navAreaMid[3];
            
    this.GetNorthWestCorner(nwCorner);
            
    this.GetSouthEastCorner(seCorner);
            
            
    MakeVectorFromPoints(seCornernwCornernavAreaMid);
            
            
    navAreaMid[0] /= 2.0;
            
    navAreaMid[1] /= 2.0;
            
            if(
    navAreaMid[0] < 0.0navAreaMid[0] *= -1;
            if(
    navAreaMid[1] < 0.0navAreaMid[1] *= -1;
            
            return (
    mid[0] <= navAreaMid[0] && mid[1] <= navAreaMid[1]);
        }
        
        
    /**
         * Get a random position within a nav area, returns false if the mins/maxs are bigger than the area
         * @param Mins of entity you want to fit in the area
         * @param Maxs of entity you want to fit in the area
         * @param buffer to store the position
         * @return bool        can entity fit in nav area
         */
        
    public bool GetRandomPos(float vMins[3], float vMaxs[3], float result[3])
        {
            
    // To stop random crashes if someone were to do stuff on a navladder
            
    if(this.IsNavLadder())
                return 
    false;
                
            
    bool returnVal true;
            
    float mid[3];
            
    MakeVectorFromPoints(vMinsvMaxsmid);
            
    mid[0] /= 2.0;
            
    mid[1] /= 2.0;
            
            if(
    mid[0] < 0.0mid[0] *= -1;
            if(
    mid[1] < 0.0mid[1] *= -1;
            
            
    float nwCorner[3], seCorner[3], navAreaMid[3];
            
    this.GetNorthWestCorner(nwCorner);
            
    this.GetSouthEastCorner(seCorner);
            
            
    MakeVectorFromPoints(seCornernwCornernavAreaMid);
            
            
    navAreaMid[0] /= 2.0;
            
    navAreaMid[1] /= 2.0;
            
            if(
    navAreaMid[0] < 0.0navAreaMid[0] *= -1;
            if(
    navAreaMid[1] < 0.0navAreaMid[1] *= -1;
            
            if(
    mid[0] > navAreaMid[0] || mid[1] > navAreaMid[1])
                
    returnVal false;
            
            
    // Add/Subtract half of the size to the random pos (To make the entity fit properly)
            
    result[0] = GetRandomFloat(nwCorner[0] + mid[0], seCorner[0] - mid[0]);
            
    result[1] = GetRandomFloat(nwCorner[1] + mid[1], seCorner[1] - mid[1]);
            
            
    // Set the position to the highest point (TODO: Add function to calculate the height of the slope at a certain point of the plane)
            
    result[2] = seCorner[2];
            
            return 
    returnVal;
        }

        
    /**
         * Get the difference in Z positions of the nav area (Used to check if its a slope or not, returns 0 if plane surface)
         * @return float        Z position difference
         */
        
    public float GetZDifference()
        {
            
    float nwCorner[3], seCorner[3];
            
    this.GetNorthWestCorner(nwCorner);
            
    this.GetSouthEastCorner(seCorner);
            
            return 
    seCorner[2] - nwCorner[2];
        }
    }

    methodmap CNavLadder CNavArea
    {
        
    /**
         * Get the top left position of the nav ladder area
         * @param buffer to store the position
         * @return void
         */
        
    public void GetTop(float result[3])
        {
            
    result[0] = view_as<float>(LoadFromAddress(view_as<Address>(this), NumberType_Int32));
            
    result[1] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(4), NumberType_Int32));
            
    result[2] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(8), NumberType_Int32));
        }
        
        
    /**
         * Get the bottom right position of the nav ladder area
         * @param buffer to store the position
         * @return void
         */
        
    public void GetBottom(float result[3])
        {
            
    result[0] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(12), NumberType_Int32));
            
    result[1] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(16), NumberType_Int32));
            
    result[2] = view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(20), NumberType_Int32));
        }
        
        
    /**
         * Get the height of the ladder
         * @return float    height of ladder
         */
        
    public float GetHeight()
        {
            return 
    view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(NAU_NAVAREA_LADDER_HEIGHT), NumberType_Int32));
        }
        
        
    /**
         * Get the width of the ladder
         * @return float    width of ladder
         */
        
    public float GetWidth()
        {
            return 
    view_as<float>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(NAU_NAVAREA_LADDER_WIDTH), NumberType_Int32));
        }
        
        
    /**
         * Get address of a destination nav area from a ladder (check NavLadderDestination)
         * @param ladder destination
         * @return address         address of the destination nav area (Address_Null if invalid navarea)
         */
        
    public CNavArea GetDestinationNavArea(NavLadderDestination destination)
        {
            return 
    view_as<CNavArea>(LoadFromAddress(view_as<Address>(this) + view_as<Address>(NAU_NAVAREA_LADDER_NAVAREAS + (0x4 view_as<int>(destination))), NumberType_Int32));
        }
        
        
    /**
         * Get the center position of the nav ladder area
         * @param buffer to store the position
         * @return void
         */
        
    public void GetCenter(float result[3])
        {
            
    float nwCorner[3], seCorner[3];
            
    this.GetTop(nwCorner);
            
    this.GetBottom(seCorner);
            
            
    NAU_GetMiddleOfABox(nwCornerseCornerresult);
        }
    }

    /**
     * Get closes neighbour nav area (By checking their center positions)
     * @param address of the nav area to check
     * @param a position to check which nav area is closest
     * @return address         address of the closest neighbour area
     */
    public CNavArea NAU_GetClosestNavAreaNeighbour(CNavArea navAreafloat pos[3])
    {
        
    CNavArea closestNavArea navArea;
        
    float startPos[3];
        
    //GetNavAreaCenter(navAreaAddress, startPos);
        
    if(!closestNavArea.IsNavLadder())
            
    closestNavArea.GetCenter(startPos);
        else
        {
            
    CNavLadder ladder view_as<CNavLadder>(closestNavArea);
            
    ladder.GetCenter(startPos);
        }
            
        
    float closestDistance GetVectorDistance(posstartPostrue);
        
    bool gotfirst false;
        if(
    navArea.IsNavLadder())
        {
            
    ArrayList ladderDestinations = new ArrayList();
            for (
    int i 0view_as<int>(NAVLADDER_MAX); i++)
            {
                
    CNavLadder ladder view_as<CNavLadder>(navArea);
                
    CNavArea destination ladder.GetDestinationNavArea(view_as<NavLadderDestination>(i));
                
                if(!
    destination.IsNullPointer())
                    
    ladderDestinations.Push(destination);
            }
            
            
    CNavArea destination ladderDestinations.Get(GetRandomInt(0ladderDestinations.Length 1));
            
            
    float navPos[3];
            if(!
    destination.IsNavLadder())
                
    destination.GetCenter(navPos);
            else
            {
                
    CNavLadder ladder view_as<CNavLadder>(destination);
                
    ladder.GetCenter(navPos);
            }

            
    closestNavArea destination;
            
    delete ladderDestinations;
        }
        else
        {
            for (
    int i 0view_as<int>(NAVDIR_MAX); i++)
            {
                
    int neighbourCount navArea.GetNeighbourCount(view_as<NavDirType>(i));
                for (
    int j 0neighbourCountj++)
                {
                    
    CNavArea neighbour navArea.GetNeighbour(view_as<NavDirType>(i), j);
                    
                    
    float navPos[3];
                    
    //GetNavAreaCenter(neighbour, navPos);
                    
                    
    if(!closestNavArea.IsNavLadder())
                        
    neighbour.GetCenter(navPos);
                    else
                    {
                        
    CNavLadder ladder view_as<CNavLadder>(neighbour);
                        
    ladder.GetCenter(navPos);
                    }
        
                    
    float dist 0.0;
                    if((
    dist GetVectorDistance(navPospostrue)) < closestDistance || !gotfirst)
                    {
                        
    closestNavArea neighbour;
                        
    closestDistance dist;
                        
    gotfirst true;
                    }
                }
            }
        }
        
        return 
    closestNavArea;
    }

    public 
    void NAU_DebugNavArea(int clientCNavArea navAreaint laserModelIndex)
    {
        
    float navAreaNW[3], navAreaSE[3], center[3];
        
        if(!
    navArea.IsNavLadder())
        {
            
    navArea.GetNorthWestCorner(navAreaNW);
            
    navArea.GetSouthEastCorner(navAreaSE);
            
    navArea.GetCenter(center);
        }
        else
        {
            
    CNavLadder ladder view_as<CNavLadder>(navArea);
            
    ladder.GetTop(navAreaNW);
            
    ladder.GetBottom(navAreaSE);
            
    ladder.GetCenter(center);
        }

        if(
    client && client <= MaxClients && IsClientInGame(client))
        {
            
    NAU_PrintVector(client"North West: "navAreaNW);
            
    NAU_PrintVector(client"South East: "navAreaSE);
            
    NAU_PrintVector(client"Center: "center);
        }
        
        
    NAU_SendBox(navAreaSEnavAreaNWlaserModelIndex, { 25500255 }, 5.0);
    }


    public 
    void NAU_DebugNavAreaNeighbours(int clientCNavArea navAreaint laserModelIndex)
    {
        if(
    navArea.IsNavLadder())
        {
            for (
    int i 0view_as<int>(NAVLADDER_MAX); i++)
            {
                
    CNavLadder ladder view_as<CNavLadder>(navArea);
                
    CNavArea destination ladder.GetDestinationNavArea(view_as<NavLadderDestination>(i));
                
    NAU_DebugNavArea(clientdestinationlaserModelIndex);
            }
        }
        else
        {
            for (
    int i 0view_as<int>(NAVDIR_MAX); i++)
            {
                
    int neighbourCount navArea.GetNeighbourCount(view_as<NavDirType>(i));
                for (
    int j 0neighbourCountj++)
                {
                    
    CNavArea neighbour navArea.GetNeighbour(view_as<NavDirType>(i), j);
                    
    NAU_DebugNavArea(clientneighbourlaserModelIndex);
                }
            }
        }
    }

    /**
     * Get the address of the clients last known nav area (Private hidden variable: offset 0x8D8 as of 7/31/2018)
     * @param client index
     * @return address         address of the last known nav area (Address_Null if player has no last known nav area)
     */
    public CNavArea NAU_GetClientLastKnownNavArea(int client)
    {
        
    // Make shit break less
        
    return view_as<CNavArea>(GetEntData(clientFindSendPropInfo("CBaseCombatCharacter""m_nRelativeDirectionOfLastInjury") + 0x8));
    }

    public 
    void NAU_Initialize(AddressnavCountAddressnavAreas)
    {
        
    Handle hConf LoadGameConfigFile(NAU_GAMEDATA);
        
        
    navCount GameConfGetAddress(hConf"navarea_count");
    #if defined DEBUG
        
    PrintToServer("Found \"navarea_count\" @ 0x%X"navCount);
    #endif
        
    navAreas view_as<Address>(LoadFromAddress(navCount view_as<Address>(0x4), NumberType_Int32));
    #if defined DEBUG
        
    PrintToServer("Found \"TheNavAreas\" @ 0x%X"navAreas);
    #endif
        
    delete hConf;
        
    #if defined DEBUG
        
    int navAreaCount NAU_GetNavAreaCount();
        
    PrintToServer("Nav area count: %d"navAreaCount);
    #endif
    }

    public 
    void NAU_GetMiddleOfABox(const float vec1[3], const float vec2[3], float result[3])
    {
        
    float mid[3];
        
    MakeVectorFromPoints(vec1vec2mid);
        
    mid[0] /= 2.0;
        
    mid[1] /= 2.0;
        
    mid[2] /= 2.0;
        
    AddVectors(vec1midresult);
    }

    public 
    bool NAU_IsPositionBlocked(float pos[3], float vMins[3], float vMaxs[3])
    {
        
    Handle ray TR_TraceHullFilterEx(posposvMinsvMaxsMASK_PLAYERSOLIDNAU_TraceFilterNothing);
        return 
    TR_DidHit(ray);
    }

    public 
    bool NAU_TraceFilterNothing(int entityhitint maskany entity)
    {
        if(
    entityhit == 0)
            return 
    true;
        
        return 
    false;
    }

    public 
    bool NAU_IsPositionBlockedIgnoreSelf(float pos[3], float vMins[3], float vMaxs[3], int entity)
    {
        
    Handle ray TR_TraceHullFilterEx(posposvMinsvMaxsMASK_PLAYERSOLIDNAU_TraceFilterIgnoreSelfentity);
        return 
    TR_DidHit(ray);
    }

    public 
    bool NAU_TraceFilterIgnoreSelf(int entityhitint maskany entity)
    {
        if(
    entityhit > -&& entityhit != entity)
            return 
    true;
        
        return 
    false;
    }

    public 
    void NAU_PrintVector(int clientchar[] prefixfloat pos[3])
    {
        
    PrintToChat(client"%s %s\x02%.2f \x04%.2f \x0C%.2f"NAU_PREFIXprefixpos[0], pos[1], pos[2]);
    }

    public 
    void NAU_SendBox(float vMins[3], float vMaxs[3], int modelIndexint color[4], float lifetime)
    {
        
    float vPos1[3], vPos2[3], vPos3[3], vPos4[3], vPos5[3], vPos6[3];
        
    vPos1 vMaxs;
        
    vPos1[0] = vMins[0];
        
    vPos2 vMaxs;
        
    vPos2[1] = vMins[1];
        
    vPos3 vMaxs;
        
    vPos3[2] = vMins[2];
        
    vPos4 vMins;
        
    vPos4[0] = vMaxs[0];
        
    vPos5 vMins;
        
    vPos5[1] = vMaxs[1];
        
    vPos6 vMins;
        
    vPos6[2] = vMaxs[2];
        
    NAU_SendBeam(vMaxsvPos1modelIndexcolorlifetime);
        
    NAU_SendBeam(vMaxsvPos2modelIndexcolorlifetime);
        
    NAU_SendBeam(vMaxsvPos3modelIndexcolorlifetime);    //Vertical
        
    NAU_SendBeam(vPos6vPos1modelIndexcolorlifetime);
        
    NAU_SendBeam(vPos6vPos2modelIndexcolorlifetime);
        
    NAU_SendBeam(vPos6vMinsmodelIndexcolorlifetime);    //Vertical
        
    NAU_SendBeam(vPos4vMinsmodelIndexcolorlifetime);
        
    NAU_SendBeam(vPos5vMinsmodelIndexcolorlifetime);
        
    NAU_SendBeam(vPos5vPos1modelIndexcolorlifetime);    //Vertical
        
    NAU_SendBeam(vPos5vPos3modelIndexcolorlifetime);
        
    NAU_SendBeam(vPos4vPos3modelIndexcolorlifetime);
        
    NAU_SendBeam(vPos4vPos2modelIndexcolorlifetime);    //Vertical
    }

    public 
    void NAU_SendBeam(const float vMins[3], const float vMaxs[3], int modelIndex, const int color[4], float lifetime)
    {
        
    TE_SetupBeamPoints(vMinsvMaxsmodelIndexmodelIndex00lifetime1.01.010.0color0);
        
    TE_SendToAll();
    }


    public 
    SharedPlugin __pl_navareautilities  =
    {
        
    name "navareautilities",
        
    file "navareautilities.smx",
    #if defined REQUIRE_PLUGIN
        
    required 1
    #else
        
    required 0
    #endif
    };

    #if !defined REQUIRE_PLUGIN
    public __pl_navareautilities_SetNTVOptional()
    {    
        
    MarkNativeAsOptional("NAU_GetNavAreaCount");
        
    MarkNativeAsOptional("NAU_GetNavAreaAddressByIndex");
    }
    #endif 
    Extra:
    Quote:
    navareautilities.smx is required unless you make your own plugin and call NAU_Initialize on map start
    navareautilities-example-roamingarea.smx is just an example how this could be used (Not required).

    Calling a NavArea function on NavLadder (or vice versa) usually causes crashes, can be prevented with CNavArea.IsNavLadder

    If nav area count is low or 0, make sure the map has a .nav file
    Gamedata:

    Windows: UP TO DATE 7/31/2018
    Linux: UP TO DATE 7/31/2018


    Credits:
    • Me
    • Pelipoika

    DOWNLOAD
    __________________
    Github: https://github.com/jimppan
    Steam: http://steamcommunity.com/id/jimppan
    _____________________________________________ _________
    Taking private requests

    Last edited by Rachnus; 02-21-2024 at 13:56.
    Rachnus is offline
    Pelipoika
    Veteran Member
    Join Date: May 2012
    Location: Inside
    Old 07-31-2018 , 07:55   Re: [CS:GO] Nav Area Utilities (v1.0 7/31/2018)
    Reply With Quote #2

    Would be better if you methodmapified the functions and kept the original names from the SDK
    __________________
    Pelipoika is offline
    _GamerX
    AlliedModders Donor
    Join Date: Jun 2011
    Location: Fun Server
    Old 07-31-2018 , 09:32   Re: [CS:GO] Nav Area Utilities (v1.0 7/31/2018)
    Reply With Quote #3

    How can this be used? and for what?
    __________________
    _GamerX is offline
    Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
    Rachnus
    Senior Member
    Join Date: Jun 2016
    Location: Funland
    Old 07-31-2018 , 11:01   Re: [CS:GO] Nav Area Utilities (v1.0 7/31/2018)
    Reply With Quote #4

    Quote:
    Originally Posted by Pelipoika View Post
    Would be better if you methodmapified the functions and kept the original names from the SDK
    Done

    Quote:
    Originally Posted by _GamerX View Post
    How can this be used? and for what?
    I made this because I wanted to spawn entities randomly across the map.
    __________________
    Github: https://github.com/jimppan
    Steam: http://steamcommunity.com/id/jimppan
    _____________________________________________ _________
    Taking private requests

    Last edited by Rachnus; 07-31-2018 at 11:04.
    Rachnus is offline
    ViceTommy
    Junior Member
    Join Date: Oct 2022
    Old 02-17-2023 , 06:50   Re: [CS:GO] Nav Area Utilities (v1.02 8/2/2018)
    Reply With Quote #5

    It seems to be broken with the recent official CSGO update.
    If you have time to fix it, I would appreciate it.
    Attached Thumbnails
    Click image for larger version

Name:	sukushot2023-02-17 194112.jpg
Views:	56
Size:	65.1 KB
ID:	199639  
    ViceTommy is offline
    CookStar
    New Member
    Join Date: Mar 2023
    Old 03-01-2023 , 07:23   Re: [CS:GO] Nav Area Utilities (v1.02 8/2/2018)
    Reply With Quote #6

    Quote:
    Originally Posted by ViceTommy View Post
    It seems to be broken with the recent official CSGO update.
    If you have time to fix it, I would appreciate it.
    This should solve the problem.
    CookStar is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 02:24.


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