Raised This Month: $ Target: $400
 0% 

Area of the location the player is in


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
opi123
Junior Member
Join Date: Apr 2005
Old 04-10-2006 , 09:11   Area of the location the player is in
Reply With Quote #1

I'm trying to get the area of the location of the player is in. The area is displayed underneath the radar on the client side. For example CT Spawn, or Bombsite A (See Attatchment). Haven't looked into it much, but anyone know of an easy way of getting this info?
Attached Images
File Type: jpg area.jpg (3.1 KB, 274 views)
opi123 is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 04-10-2006 , 11:49  
Reply With Quote #2

Code:
IPlayerInfo *info = m_PlayerInfoManager->GetPlayerInfo( pEntity );
Vector vecPlayer = info->GetAbsOrigin();
It seems to be a little delayed.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
opi123
Junior Member
Join Date: Apr 2005
Old 04-10-2006 , 12:27  
Reply With Quote #3

That's is not what i'm asking. GetAbsOrigin() only gives me the x,y,z coordinates. I need to be able to tell what area of the map they are in. All the official CS maps have this.

Did a bit of searching in the CSS news.

[-] February 24, 2005

Changes/Additions
--------------------------------------------------------------------------------
Location names are shown in radio/team chat, and under the radar.

What I want is the location name of the location the player is currently in. Not quite sure where and how these locations are stored though.
opi123 is offline
opi123
Junior Member
Join Date: Apr 2005
Old 04-10-2006 , 12:46  
Reply With Quote #4

I found a tutorial which shows how to create these location names for mappers. http://www.editlife.net/tutorial.php?id=33 It appears that the .nav file contains the location names. Now how can I get the information that I want from the nav file or from where it stores it in memory after it loads it?
opi123 is offline
Knagg0
SourceMod Donor
Join Date: Dec 2005
Location: Germany
Old 04-10-2006 , 14:32  
Reply With Quote #5

i don't know, but maybe with this functions...

Code:
CGameRules::GetChatLocation(bool bTeamOnly, CBasePlayer *pPlayer)
CCSGameRules::GetChatLocation(bool bTeamOnly, CBasePlayer *pPlayer)
Knagg0 is offline
opi123
Junior Member
Join Date: Apr 2005
Old 04-11-2006 , 10:49  
Reply With Quote #6

Yeah I'm pretty sure that's the function i'm looking for. Now to implement it... If I get it working, i'll post my code.

Thanks for your help Knagg0.
opi123 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 04:18.


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