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

Team Question


Post New Thread Reply   
 
Thread Tools Display Modes
BAILOPAN
Join Date: Jan 2004
Old 07-11-2007 , 16:36   Re: Team Question
Reply With Quote #31

No... the inheritance chain is roughly:

CCSPlayer -> CBasePlayer -> CBaseCombatCharacter -> CBaseEntity

Each CCSPlayer will use the CCSPlayer server class for networking.

You can go from edict_t to CBaseEntity pretty easily:
pEdict->GetUnknown()->GetBaseEntity()

And from index to edict_t:
engine->PEntityOfEntIndex(index)
__________________
egg

Last edited by BAILOPAN; 07-11-2007 at 16:38.
BAILOPAN is offline
Aidan
Junior Member
Join Date: Jul 2007
Old 07-11-2007 , 17:00   Re: Team Question
Reply With Quote #32

Quote:
Originally Posted by BAILOPAN View Post
No... the inheritance chain is roughly:

CCSPlayer -> CBasePlayer -> CBaseCombatCharacter -> CBaseEntity

Each CCSPlayer will use the CCSPlayer server class for networking.

You can go from edict_t to CBaseEntity pretty easily:
pEdict->GetUnknown()->GetBaseEntity()

And from index to edict_t:
engine->PEntityOfEntIndex(index)
Okie, and my apologies for my misunderstanding/confusion on this issue.

Here's what I've done.

CBaseEntity *playerEntity = pEdict->GetUnknown( )->GetBaseEntity( );

I know I need to get the offset for CCSPlayer::SwitchTeam( );
However, when I try to look the offset up using FindOffset, it finds CCSPlayer, but not SwitchTeam. I've also gone through the list of offset names it did find and couldn't find it.

Could you offer any suggestions on this?

Sorry again for all of the trouble, but thank you for your continued help.

-Rob
Aidan is offline
BAILOPAN
Join Date: Jan 2004
Old 07-11-2007 , 18:48   Re: Team Question
Reply With Quote #33

SwitchTeam isn't an offset. It's a function.
__________________
egg
BAILOPAN is offline
showdax
Senior Member
Join Date: Dec 2004
Old 07-16-2007 , 17:30   Re: Team Question
Reply With Quote #34

You could try setting the SendProp CBaseEntity.m_iTeamNum and then respawning the player with CCSPlayer::RoundRespawn().

That wouldn't be like SwitchTeam() though, that'd be automatic.
showdax is offline
Send a message via MSN to showdax
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 07-18-2007 , 04:45   Re: Team Question
Reply With Quote #35

showdax, that method doesnt work.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
showdax
Senior Member
Join Date: Dec 2004
Old 07-20-2007 , 08:51   Re: Team Question
Reply With Quote #36

Quote:
Originally Posted by c0ldfyr3 View Post
showdax, that method doesnt work.
I'm pretty sure it worked for me once in the past. What about it wouldn't work?
showdax is offline
Send a message via MSN to showdax
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 16:59.


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