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

Team Question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Aidan
Junior Member
Join Date: Jul 2007
Old 07-07-2007 , 22:20   Team Question
Reply With Quote #1

Okay, I've been digging around in the SDK for the last few days and here's what I'm doing.

I'm working on a function in which I need to loop through each team for CS:S. In it I need to be able to access the team score, players, and the score for each player.

I know I need to use c_team.h, however, doing so requires including half of the sdk for what should be a relatively simple plugin.

Any suggestions on where to start?

Thanks
Aidan
Aidan is offline
BAILOPAN
Join Date: Jan 2004
Old 07-07-2007 , 23:14   Re: Team Question
Reply With Quote #2

c_ means "client-side" in Valvespeak. are you developing a server-side modification?
__________________
egg
BAILOPAN is offline
Aidan
Junior Member
Join Date: Jul 2007
Old 07-07-2007 , 23:26   Re: Team Question
Reply With Quote #3

Quote:
Originally Posted by BAILOPAN View Post
c_ means "client-side" in Valvespeak. are you developing a server-side modification?
I'm developing a plugin to tag onto metamod for a sophisticated team balance.
Aidan is offline
BAILOPAN
Join Date: Jan 2004
Old 07-07-2007 , 23:53   Re: Team Question
Reply With Quote #4

Then you're poking into the wrong areas. I would take a gander at this article: http://wiki.alliedmods.net/Entity_Properties

Then at this: http://wiki.alliedmods.net/Useful_Si...s_%28Source%29

The latter because you will need to call CCSPlayer::SwitchTeam() for good team balancing.
__________________
egg
BAILOPAN is offline
Aidan
Junior Member
Join Date: Jul 2007
Old 07-08-2007 , 00:00   Re: Team Question
Reply With Quote #5

Quote:
Originally Posted by BAILOPAN View Post
Then you're poking into the wrong areas. I would take a gander at this article: http://wiki.alliedmods.net/Entity_Properties

Then at this: http://wiki.alliedmods.net/Useful_Si...s_%28Source%29

The latter because you will need to call CCSPlayer::SwitchTeam() for good team balancing.

So where would I look to find the actual team data being stored by the server?

For example:

team[2]->score

That's more where I'm looking. I did take a look at those two articles and they both have a lot of useful information that I'll be needing later on.

My biggest problem atm is I can't find anything in the SDK because everything is spread out among the entire thing.

Sorry for all the questions.

-Aidan
Aidan is offline
BAILOPAN
Join Date: Jan 2004
Old 07-08-2007 , 00:52   Re: Team Question
Reply With Quote #6

Look near/at the CCSTeam entity layout. There is a networkable entity for each team and they help propagate information to clients.

Once you get the CBaseEntity * pointer for one of the team entities, it's just a matter of using the offsets properly to peek at the private data.
__________________
egg
BAILOPAN is offline
Aidan
Junior Member
Join Date: Jul 2007
Old 07-08-2007 , 11:06   Re: Team Question
Reply With Quote #7

Okay, I found the CBaseEntity in baseentity.h and added that in.

Is the networkable entity g_TeamData or whatnot?

Again, sorry for all the questions, I do know how to code, just not familiar with this SDK and there isn't any documentation on the data I'm trying to access anywhere that I can find.
Aidan is offline
BAILOPAN
Join Date: Jan 2004
Old 07-08-2007 , 14:46   Re: Team Question
Reply With Quote #8

You can't access any of the mod's data reliably against the SDK. Addresses/signatures/orders change. That's why said article exists, because the most common way to do things is using the network property tables.

If you're on Linux you can probably get away with accessing global variables and such (because the binaries have symbols in tact and ELF late-resolves), but there's no guarantee that accessing their members or functions against the SDK will work as expected (if at all).
__________________
egg
BAILOPAN is offline
Aidan
Junior Member
Join Date: Jul 2007
Old 07-08-2007 , 16:19   Re: Team Question
Reply With Quote #9

Quote:
Originally Posted by BAILOPAN View Post
You can't access any of the mod's data reliably against the SDK. Addresses/signatures/orders change. That's why said article exists, because the most common way to do things is using the network property tables.

If you're on Linux you can probably get away with accessing global variables and such (because the binaries have symbols in tact and ELF late-resolves), but there's no guarantee that accessing their members or functions against the SDK will work as expected (if at all).

Not on Linux unfortuantely, its a Windows server.
Aidan is offline
Aidan
Junior Member
Join Date: Jul 2007
Old 07-08-2007 , 23:52   Re: Team Question
Reply With Quote #10

Okay, so I did a lot more reading today and I found out I need to #include <cbase.h>, because I need to use the entities held within that.

However -- when I include that file, I get about 400 errors.

Can anyone offer any suggestions on what to do to get it working?

Thanks,
Rob
Aidan is offline
Reply


Thread Tools
Display Modes

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 09:33.


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