Team Question
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 |
Re: Team Question
c_ means "client-side" in Valvespeak. are you developing a server-side modification?
|
Re: Team Question
Quote:
|
Re: Team Question
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. |
Re: Team Question
Quote:
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 |
Re: Team Question
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. |
Re: Team Question
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. |
Re: Team Question
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). |
Re: Team Question
Quote:
Not on Linux unfortuantely, its a Windows server. |
Re: Team Question
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 |
All times are GMT -4. The time now is 23:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.