Raised This Month: $ Target: $400
 0% 

CSS GetClanTag


Post New Thread Reply   
 
Thread Tools Display Modes
PMA.Predator
Member
Join Date: Jan 2012
Old 04-05-2012 , 04:17   Re: CSS GetClanTag
Reply With Quote #11

I just can't get it to work :/ everything I try just returns different meaningless data.

I don't suppose it has anything to do with being a local server? :s
PMA.Predator is offline
PMA.Predator
Member
Join Date: Jan 2012
Old 05-13-2012 , 21:06   Re: CSS GetClanTag
Reply With Quote #12

Woo, finally got it working!

Thanks for the help everyone, Can finally include the detection back into PMA!

Just a final thought, how often does this offset change? Is there any decent way to write a scanner for it? (Such as parsed a players tag and scan through it until it can find it in the data string?

Thanks
- Edd
PMA.Predator is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 05-13-2012 , 23:06   Re: CSS GetClanTag
Reply With Quote #13

Out of curiosity what was the issue? There really isn't a good way to grab the offset. The best method is probably the one used in SourceMod finding the SetClanTag function and grabbing the offset from there. Its not terribly likely to change but it could. Valve would have to add a variable to the player class before the tag variable. Its less likely now as CS:S hasnt been getting updates for a while now.
Dr!fter is offline
PMA.Predator
Member
Join Date: Jan 2012
Old 05-15-2012 , 09:09   Re: CSS GetClanTag
Reply With Quote #14

Sorry, was trying to reply yesterday but forgot my password, then forgot my Google mail password and only just got a chance to reset it!

The issue is a curious one, I'm not complete sure myself. I have altered it so that CommandUserIndex is automatically +1 when it's set (As it comes in -1 of the index) However, the command index I had to parse to the function needed to be a +1 of that again, which doesn't quite make sense to me, allow me to explain:

Here's the code now:

Code:
serverplugin_main::

void CMatchAdmin::SetCommandClient( int index )
{
    m_iClientCommandIndex = index;
    Command.ClientCommand(index + 1);
}

Commands.h::

void pma_test(const CCommand &args)
{
    //DumpServerClasses();
    edict_t *pEntity = pEngine->PEntityOfEntIndex( (Command.GetCommandIndex() + 1) );
    if ( !pEntity || pEntity->IsFree() ) return;

    char result[64];
    if (getClanTag(pEntity,result,64))
    {
        Msg("Result: %s\n",result);
    }
    else
    {
        Msg("Failed\n");
    }
}
ConCommand pa_test("pa_test", pma_test, "PMA ~ Test Command", 0);
As you can see I already add 1 when setting it in the commands function, so I'm not quite sure why it required an addition +1, maybe you guys know why?

Also INetChannel and IClient required the +1 as well, which again makes me a little confused

As for finding, My first through is to just extract portions of the pEntity and do a strstr check until I find it, but I did find it crashed at about Offset 3000-3100, but it was alright for the rest of it. saying that, Sourcemods way sounds a lot easier and cleaner!

Now I've just got to fix that issue I made a post about before (Displaying a local html file in the vgui window) and my plugin is completed :O

Thanks for all the help
- Edd
PMA.Predator is offline
PMA.Predator
Member
Join Date: Jan 2012
Old 05-22-2012 , 18:17   Re: CSS GetClanTag
Reply With Quote #15

Talk about never updating..

Any chance someone could tell me the new windows and linux offsets for the clantag? I've not even got around to releasing the new version where it's fixed before It's broke again! xD



Thanks
- Edd
PMA.Predator is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 05-22-2012 , 20:01   Re: CSS GetClanTag
Reply With Quote #16

linux: 5592
Windows: 5572
Dr!fter is offline
PMA.Predator
Member
Join Date: Jan 2012
Old 05-23-2012 , 13:04   Re: CSS GetClanTag
Reply With Quote #17

Thanks
PMA.Predator is offline
PMA.Predator
Member
Join Date: Jan 2012
Old 07-04-2012 , 13:57   Re: CSS GetClanTag
Reply With Quote #18

Hey,

Do you know the new values after yesterdays update?

Thanks
- Edd
PMA.Predator is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 07-04-2012 , 14:36   Re: CSS GetClanTag
Reply With Quote #19

They didnt change still

linux: 5592
Windows: 5572
Dr!fter is offline
PMA.Predator
Member
Join Date: Jan 2012
Old 07-04-2012 , 14:39   Re: CSS GetClanTag
Reply With Quote #20

Ah ok, thanks a lot

Not able to test right now but just wanted to be sure before I release the new pma version

Thanks again!
- Edd
PMA.Predator 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 09:06.


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