Raised This Month: $ Target: $400
 0% 

[TF2] Set Dominations


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
J-Factor
Junior Member
Join Date: Jul 2009
Old 07-01-2009 , 05:07   [TF2] Set Dominations
Reply With Quote #1

Simple snippet that allows you to set Dominations. Doesn't show the Domination message ("Player 1 is DOMINATING Player 2") but Revenge works.

PHP Code:
new offsDominatingMe = -1;
new 
offsDominated = -1;

public 
OnPluginStart()
{
    
offsDominatingMe FindSendPropInfo("CTFPlayer""m_bPlayerDominatingMe");
    
offsDominated FindSendPropInfo("CTFPlayer""m_bPlayerDominated");
}

stock TF2_SetPlayerDominated(dominatorvictimbool:value=true)
{
    
SetEntData(dominatoroffsDominated victimvalue1true);
    
SetEntData(victimoffsDominatingMe dominatorvalue1true);

Example use:
PHP Code:
SetAllDominating(client)
{
    for (new 
1<= MaxClientsi++) {
        if (
IsClientConnected(i) && IsClientInGame(i)) {
            
TF2_SetPlayerDominated(iclienttrue);
        }
    }

Sets all players as dominating client. Even 'client' themselves! (suicide causes a revenge).

Last edited by J-Factor; 07-01-2009 at 05:09. Reason: Had '< MaxClients' instead of '<= MaxClients'
J-Factor 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:42.


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