Re: Team Question
L. Duke,
Could you show me how you've got your gDBUtils::GetTeamTeamNum(pEnt); function written? Thanks again for all of the help. |
Re: Team Question
Actually, I got it. Sorry about that.
Baltoa, thank you for the list you posted with the table dump in it. It was amazingly helpful. :) |
Re: Team Question
okay,
I have another, hopefully simple question now that I've figured the basics to this out. :) Where is the player data stored? ie player1->kills, player1->deaths I found some in CBasePlayer, however, I'm sure thats not where I need to look and its not in the table http://www.bailopan.net/table_dump.txt that Bailopan gave me. The only thing in there that I felt could be close was CPlayerResource using m_iScore and m_iDeaths, however, when I called that with the offset it didn't increment up with kills/deaths. Sorry for all of the stupid questions. |
Re: Team Question
m_iFrags and m_iDeaths as saverestore (datamap_t) properties instead of network (sendprop) properties. the article covers those too; lookup method is the only thing that changes.
it is safe to call CBaseEntity::GetDataDescMap() from almost all mods except The Ship because it's very low in the vtable ordering. if you only need to get the information, you can use IPlayerInfoManager, because IPlayerInfo has GetPlayerFrags and GetPlayerDeaths |
Re: Team Question
Quote:
|
Re: Team Question
Quote:
Bailopan, Is the sig scanning available in metamod or is it sourcemod only? Thanks -Rob |
Re: Team Question
Scanning memory is something you can do on any platform. SourceMod just has builtin helper functions for it, so you don't have to write your own code.
|
Re: Team Question
Okie dokie, things work. Many many thanks to Bailopan and L. Duke for putting up with me and pointing me in the right direction.
I did have one last question though. Using, IPlayerInfo *plr; plr->ChangeTeam(newTeam); That swaps the player to the opposite team and puts them in the menu to choose a model. Is there anyway I can simply change them to the opposite team and set their model to a default one so that it doesn't "slay" them and make them respawn without the things they'd already bought? Thanks Rob |
Re: Team Question
CCSPlayer::SwitchTeam does that -- just know you will have to scan for its address since it's not a virtual function nor something easily exposed.
|
Re: Team Question
Quote:
Okay, I did a ServerClass scan for CCSPlayer and found it. I also managed to step through all of CCSPlayer's variable info, however, I'm a bit stuck as to what to do now. Having found ServerClass *s as CCSPlayer, do I simply do CCSPlayer *p = s; ? Sorry for all of the questions, this stuffs just a bit confusing at first. Thanks, Rob |
All times are GMT -4. The time now is 22:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.