Raised This Month: $ Target: $400
 0% 

[TF2] Get ACTIVE Dominations


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 08-01-2009 , 22:25   [TF2] Get ACTIVE Dominations
Reply With Quote #1

Im actually surprised I was able to figure this out w/o bugging people like mikejs or antithasys.

Someone asked that I have a domination difference auto-scramble check for my thing, so this is what I came up with. I didn't find any threads about it, so I figured i'd post it.

PHP Code:
stock TF2_GetPlayerDominations(client)
{
    new 
dominations;
    new 
offset FindSendPropInfo("CTFPlayerResource""m_iActiveDominations");
    new 
ent FindEntityByClassname(-1"tf_player_manager");
    if (
ent != -1)
        
dominations GetEntData(ent, (offset client*4), 4);    
    return 
dominations;
}

stock TF2_GetTeamDominations(team)
{
    new 
dominations;
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && GetClientTeam(i) == team)
            
dominations += TF2_GetPlayerDominations(i);
    }
    return 
dominations;

__________________
My Pluggies If you like, consider to me.
BrutalGoerge is offline
 



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 18:16.


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