Raised This Month: $51 Target: $400
 12% 

[TF2] Selecting multiple people


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Riotline
AlliedModders Donor
Join Date: Oct 2015
Location: Half Life 3
Old 10-02-2016 , 02:42   [TF2] Selecting multiple people
Reply With Quote #1

I want to select multiple people like @red, @blue, @all but I dont know how to.
__________________
Riotline is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 10-02-2016 , 02:49   Re: [TF2] Selecting multiple people
Reply With Quote #2

Command Filters
Phil25 is offline
Riotline
AlliedModders Donor
Join Date: Oct 2015
Location: Half Life 3
Old 10-02-2016 , 02:58   Re: [TF2] Selecting multiple people
Reply With Quote #3

Thanks
__________________
Riotline is offline
Riotline
AlliedModders Donor
Join Date: Oct 2015
Location: Half Life 3
Old 10-02-2016 , 04:08   Re: [TF2] Selecting multiple people
Reply With Quote #4

Can someone give me an example of how to do it?
__________________
Riotline is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 10-02-2016 , 04:47   Re: [TF2] Selecting multiple people
Reply With Quote #5

PHP Code:
public void OnPluginStart(){
    
    
AddMultiTargetFilter("@letterB"TargetFilter_LetterB"Players who have the letter B in their name."false);

}

public 
void OnPluginEnd(){

    
RemoveMultiTargetFilter("@letterB"TargetFilter_LetterB);

}

public 
bool TargetFilter_LetterB(const char[] sPatternHandle hClients){

    
char sName[MAX_NAME_LENGTH];
    for(
int i 1<= MaxClientsi++){
    
        if(!
IsClientInGame(i))
            continue;
    
        
GetClientName(isNameMAX_NAME_LENGTH);
        if(
FindCharInString(sName'b') != -|| FindCharInString(sName'B') != -1)
            
PushArrayCell(hClientsi);
    
    }

    
//Return true if anything was found
    
return GetArraySize(hClients) > 0;


I'm not sure if RemoveMultiTargetFilter in OnPluginEnd is needed but I'd do it anyways.
Phil25 is offline
Riotline
AlliedModders Donor
Join Date: Oct 2015
Location: Half Life 3
Old 10-02-2016 , 07:10   Re: [TF2] Selecting multiple people
Reply With Quote #6

Lol i give up cus im bad... Can you give me an example for Red Targeting XD
__________________
Riotline is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 10-02-2016 , 07:17   Re: [TF2] Selecting multiple people
Reply With Quote #7

You mean for targeting the red team?
Phil25 is offline
Riotline
AlliedModders Donor
Join Date: Oct 2015
Location: Half Life 3
Old 10-02-2016 , 07:18   Re: [TF2] Selecting multiple people
Reply With Quote #8

Yes. Targeting the red team
__________________
Riotline is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 10-02-2016 , 07:55   Re: [TF2] Selecting multiple people
Reply With Quote #9

Quote:
Originally Posted by Riotline View Post
Yes. Targeting the red team
/slay @red
/mute @red
/kick @red
or
PHP Code:
ServerCommand("sm_slay @red"); 
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox is offline
Riotline
AlliedModders Donor
Join Date: Oct 2015
Location: Half Life 3
Old 10-02-2016 , 19:27   Re: [TF2] Selecting multiple people
Reply With Quote #10

Ye but how do I make the MultiTargetFilter for red team like Phil25 said but specific for red team

also anyone know how to randomize only red team xD
__________________
Riotline 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 20:24.


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