Raised This Month: $ Target: $400
 0% 

[TF2] Selecting multiple people


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-02-2016 , 19:48   Re: [TF2] Selecting multiple people
Reply With Quote #12

If, for some strange reason, you wanted to re-create @red (which already exists), here's how you'd do it:

PHP Code:
public void OnPluginStart() {
    
AddMultiTargetFilter("@red2"TargetFilter_red2"Red Team"false);
}

public 
void OnPluginEnd() {
    
RemoveMultiTargetFilter("@red2"TargetFilter_red2);
}

public 
bool TargetFilter_red2(const char[] sPatternHandle hClients) {
    
bool foundTarget;
    for(
int i 1<= MaxClientsi++) {
        if (
IsClientInGame(i) && TF2_GetClientTeam(client) == TFTeam_Red) {
            
PushArrayCell(hClientsi);
            
foundTarget true;
        }
    }
    return 
foundTarget;

__________________

Last edited by ddhoward; 10-02-2016 at 20:31. Reason: fixing the error pointed out two posts below this
ddhoward 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 01:10.


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