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

Solved Question : How to Restrict the Output to a Specific Team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-10-2018 , 04:37   Question : How to Restrict the Output to a Specific Team
Reply With Quote #1

For example here is a Test Plugin :
HTML Code:
#include <amxmodx>

public plugin_init()
{
	register_plugin("PLUGIN", "VERSION", "AUTHOR")
	register_clcmd("say /test", "cmdtest")	
}

public cmdtest(id){
	client_print_color(0, print_team_default, "^4Message only for a specific TEAM")
}
I want to ask , Can we restrict output of Client_print to a Specific Team ??
Coz using ( 0 ) will display to all clients !! ( We want message to be visible for a Specific Team )

Just a Question ,
If its Possible ; Then How ??

Last edited by instinctpt1; 02-10-2018 at 06:33. Reason: got it !!
instinctpt1 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-10-2018 , 04:40   Re: Question : How to Restrict the Output to a Specific Team
Reply With Quote #2

Use get_players to get all players from a specific team and print to each of them.
__________________
HamletEagle is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-10-2018 , 05:19   Re: Question : How to Restrict the Output to a Specific Team
Reply With Quote #3

Aah , Thanks Hamlet !!
But as i m new, can you tell me if this is correct or not ?
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
register_clcmd("say /test""cmdtest")    
}

public 
cmdtest(id){
    new 
players[MAX_PLAYERS], num
    get_players
(playersnum"ae""CT")
    for( new 
0numi++ ){
        
client_print_color(0print_team_default"Message only for a specific TEAM")
    }

Will it Print only to CTs ?
instinctpt1 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-10-2018 , 05:23   Re: Question : How to Restrict the Output to a Specific Team
Reply With Quote #4

Set the first parameter to players[i]
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 02-10-2018 at 05:24.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-10-2018 , 05:30   Re: Question : How to Restrict the Output to a Specific Team
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
Set the first parameter to players[i]
Code:
new players[i]
Like this ?
Whats the Reason to Replace MAX_PLAYERS with this ?
instinctpt1 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-10-2018 , 06:08   Re: Question : How to Restrict the Output to a Specific Team
Reply With Quote #6

In client print color replace the 0 to players[i]
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-10-2018 , 06:32   Re: Question : How to Restrict the Output to a Specific Team
Reply With Quote #7

Natsheh, Hamlet Thanks both for making me Understand
instinctpt1 is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 02-10-2018 , 08:45   Re: Question : How to Restrict the Output to a Specific Team
Reply With Quote #8

ye kya hai samjha nahi explain kar[ hindi ]

What is this explain me plz [ ENGLISH ]
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-10-2018 , 12:03   Re: Question : How to Restrict the Output to a Specific Team
Reply With Quote #9

@soumyadip i was asking, how we can use color chat or any function only in a specific team , which they told me how to do, coz if we use 0 it will display to all clients but i want only team
instinctpt1 is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 02-10-2018 , 20:26   Re: Question : How to Restrict the Output to a Specific Team
Reply With Quote #10

that mens i can make captain chat bu hud same process i guess
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
Reply


Thread Tools
Display Modes

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 03:00.


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