Raised This Month: $ Target: $400
 0% 

[CSGO] Doing stuff with TheNavAreas and navarea_count


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 07-18-2018 , 14:35   Re: [CSGO] Doing stuff with TheNavAreas and navarea_count
Reply With Quote #1

PHP Code:
navarea_count GameConfGetAddress(hConf"navarea_count"); 
This is returning 0, which is not a valid address. This could be because it failed to read the gamedata or because the gamedata is outdated.
hmmmmm is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 07-18-2018 , 18:53   Re: [CSGO] Doing stuff with TheNavAreas and navarea_count
Reply With Quote #2

Quote:
Originally Posted by hmmmmm View Post
PHP Code:
navarea_count GameConfGetAddress(hConf"navarea_count"); 
This is returning 0, which is not a valid address. This could be because it failed to read the gamedata or because the gamedata is outdated.
Nice OS

EDIT:
Still works fine on Windows 19.07.2018
__________________

Last edited by Pelipoika; 07-19-2018 at 12:21.
Pelipoika is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 07-23-2018 , 21:25   Re: [CSGO] Doing stuff with TheNavAreas and navarea_count
Reply With Quote #3

Quote:
Originally Posted by Pelipoika View Post
Nice OS

EDIT:
Still works fine on Windows 19.07.2018
still can't get it to work

Code:
Found "navarea_count" @ 0x0
L 07/23/2018 - 18:23:44: [SM] Exception reported: Invalid address 0x4 is pointing to reserved memory.
L 07/23/2018 - 18:23:44: [SM] Blaming: test.smx
L 07/23/2018 - 18:23:44: [SM] Call stack trace:
L 07/23/2018 - 18:23:44: [SM]   [0] LoadFromAddress
L 07/23/2018 - 18:23:44: [SM]   [1] Line 13, C:\Users\test\Dropbox\sm 1.8\test.sp::OnMapStart
[SM] Loaded plugin test.smx successfully.
 
 
 SourceMod Version Information:
    SourceMod Version: 1.9.0.6245
    SourcePawn Engine: 1.9.0.6245, jit-x86 (build 1.9.0.6245)
    SourcePawn API: v1 = 4, v2 = 12
    Compiled on: Jul 13 2018 04:50:03
    Built from: https://github.com/alliedmodders/sourcemod/commit/50b5bb19
    Build ID: 6245:50b5bb19
    http://www.sourcemod.net/
 
 
Metamod:Source version 1.10.7-dev
Built from: https://github.com/alliedmodders/metamod-source/commit/20c72b5
Build ID: 963:20c72b5
Loaded As: Valve Server Plugin
Compiled on: Jul  7 2018
Plugin interface version: 15:14
SourceHook version: 5:5
http://www.metamodsource.net/
PHP Code:
Address TheNavAreas;
Address navarea_count;

//You want to do this in OnMapStart or else after a map change you will have a bad address
public void OnMapStart()
{
    
Handle hConf LoadGameConfigFile("yourgamedata");
    
    
navarea_count GameConfGetAddress(hConf"navarea_count");
    
PrintToServer("Found \"navarea_count\" @ 0x%X"navarea_count);
    
    
//TheNavAreas is nicely above navarea_count
    
TheNavAreas view_as<Address>(LoadFromAddress(navarea_count view_as<Address>(0x4), NumberType_Int32));
    
PrintToServer("Found \"TheNavAreas\" @ 0x%X"TheNavAreas);
    
    
delete hConf;

__________________
8guawong is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 07-23-2018 , 21:50   Re: [CSGO] Doing stuff with TheNavAreas and navarea_count
Reply With Quote #4

Quote:
Originally Posted by 8guawong View Post
still can't get it to work
Sooo... linux?

I've never tested Linux but try "read 17" instead of "read 18"
__________________

Last edited by Pelipoika; 07-23-2018 at 22:01.
Pelipoika is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 07-23-2018 , 22:10   Re: [CSGO] Doing stuff with TheNavAreas and navarea_count
Reply With Quote #5

Quote:
Originally Posted by Pelipoika View Post
Sooo... linux?

I've never tested Linux but try "read 17" instead of "read 18"
well i'm pretty sure the server is running windows....

162.251.167.84:27019 is the server in question

hostname: [BM] Zombie Riot RPG
version : 1.36.4.2 secure
os : Windows
type : community dedicated
gotv[0]: port 27219, delay 30.0s, rate 32.0
__________________

Last edited by 8guawong; 07-23-2018 at 22:14.
8guawong is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 07-23-2018 , 22:18   Re: [CSGO] Doing stuff with TheNavAreas and navarea_count
Reply With Quote #6

Quote:
Originally Posted by 8guawong View Post
well i'm pretty sure the server is running windows....

162.251.167.84:27019 is the server in question

hostname: [BM] Zombie Riot RPG
version : 1.36.4.2 secure
os : Windows
type : community dedicated
gotv[0]: port 27219, delay 30.0s, rate 32.0
Does that happen instantly when you load the plugin?
Does that happen after a map change?
Does the map have a navmesh?
__________________
Pelipoika is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 07-23-2018 , 22:25   Re: [CSGO] Doing stuff with TheNavAreas and navarea_count
Reply With Quote #7

Quote:
Originally Posted by Pelipoika View Post
Does that happen instantly when you load the plugin?
Does that happen after a map change?
Does the map have a navmesh?
1. yes happens instantly when i do sm plugins reload test.smx
2.
Code:
L 07/23/2018 - 19:35:02: [umc-core.smx] ---------------------MAP CHANGE: de_dust2---------------------
Found "navarea_count" @ 0x0
L 07/23/2018 - 19:35:02: [SM] Exception reported: Invalid address 0x4 is pointing to reserved memory.
L 07/23/2018 - 19:35:02: [SM] Blaming: test.smx
L 07/23/2018 - 19:35:02: [SM] Call stack trace:
L 07/23/2018 - 19:35:02: [SM]   [0] LoadFromAddress
L 07/23/2018 - 19:35:02: [SM]   [1] Line 13, C:\Users\test\Dropbox\sm 1.8\test.sp::OnMapStart
3. tested on offical csgo maps... de_dust2
__________________

Last edited by 8guawong; 07-23-2018 at 22:38.
8guawong 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 19:49.


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