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

Chat Trigger in Team Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 05-03-2009 , 04:56   Chat Trigger in Team Chat
Reply With Quote #1

Hey, im trying to make a plugin that uses a command to make colored chat. Like /color text here. But I am having trouble applying this to say_team. I have also taken the code from various places and I think some of it is unecessary. Please dont steal the code, I have had problems with people taking things from me. Thanks for any help! http://dwn.pastebin.com/d3fa14cbb
__________________


Last edited by DontWannaName; 05-03-2009 at 05:59.
DontWannaName is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-03-2009 , 05:32   Re: Chat Trigger in Team Chat
Reply With Quote #2

Looks like you need to check if players are on the same team as the person who spoke.
__________________
MikeJS is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 05-03-2009 , 05:59   Re: Chat Trigger in Team Chat
Reply With Quote #3

I dont know how to do that. I found some code you posted and added it but this is all so rough.
__________________

DontWannaName is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-03-2009 , 06:39   Re: Chat Trigger in Team Chat
Reply With Quote #4

PHP Code:
new team GetClientTeam(client);
for (new 
1<= MaxClientsi++) 
{
    if ( 
IsClientConnected(i) && !IsFakeClient(i) && IsClientInGame(i) && GetClientTeam(i)==team
    {
        
SayText2One(iaction);
    }

__________________
MikeJS is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 05-03-2009 , 15:40   Re: Chat Trigger in Team Chat
Reply With Quote #5

Thanks, next problem is using the command in say_team. How do I get it to know if they are using the command and to ignore it if they arent. The args stuff doesnt work http://dwn.pastebin.com/d2617ad7b
__________________

DontWannaName is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-03-2009 , 17:00   Re: Chat Trigger in Team Chat
Reply With Quote #6

You could RegConsoleCmd("sm_color"...); and it'd hook !color and /color in chat for you.
__________________
MikeJS is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 05-03-2009 , 17:10   Re: Chat Trigger in Team Chat
Reply With Quote #7

Dont I do that in plugin start?
__________________

DontWannaName is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-03-2009 , 18:55   Re: Chat Trigger in Team Chat
Reply With Quote #8

Yup.
__________________
MikeJS is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 05-03-2009 , 21:28   Re: Chat Trigger in Team Chat
Reply With Quote #9

So how does it know its say_team? Im confused.

nvm I think I got it working. Thanks
__________________


Last edited by DontWannaName; 05-04-2009 at 02:44.
DontWannaName is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-04-2009 , 06:01   Re: Chat Trigger in Team Chat
Reply With Quote #10

GetCmdArg(0, String:buffer[], maxlength) would probably tell you if it's say or say_team.
__________________
MikeJS 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 16:26.


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