Raised This Month: $ Target: $400
 0% 

Colorchat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
InteX01
Senior Member
Join Date: Jan 2017
Old 01-24-2017 , 10:55   Colorchat
Reply With Quote #1

Code:
public plugin_init() {
	register_clcmd("say /bla","BlaBla")
}
public BlaBla(id) {
ColorChat(id, GREEN, "[AMXX] ^3BlaBlaBla sadasdsad.")
}
Id like to send this message to all players on server not just client who types command
Im noob :/

Last edited by InteX01; 01-24-2017 at 10:56.
InteX01 is offline
MaXs
Member
Join Date: Jan 2017
Old 01-24-2017 , 11:12   Re: Colorchat
Reply With Quote #2

you want make plugin yourself? actually you can use amx_say
MaXs is offline
InteX01
Senior Member
Join Date: Jan 2017
Old 01-24-2017 , 11:18   Re: Colorchat
Reply With Quote #3

No you didnt understand me.

When client use /bla command (in this case)
It should send message to all players on server.

By using command that i posted it just sends message to client who used /bla command.
InteX01 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-24-2017 , 13:07   Re: Colorchat
Reply With Quote #4

ColorChat(id = > ColorChat(0
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
MaXs
Member
Join Date: Jan 2017
Old 01-24-2017 , 15:16   Re: Colorchat
Reply With Quote #5

I dont recommend using this because of spam maybe add some flags that will allow only for vip/admin doing this.
MaXs is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-24-2017 , 16:01   Re: Colorchat
Reply With Quote #6

Quote:
Originally Posted by MaXs View Post
I dont recommend using this because of spam maybe add some flags that will allow only for vip/admin doing this.
Are you.......... nope... not even going to bother with that comment.
__________________

Last edited by OciXCrom; 01-24-2017 at 16:03.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 01-24-2017 , 17:18   Re: Colorchat
Reply With Quote #7

try this man

PHP Code:
new szName[32];
get_user_name(idszNamecharsmax(szName));

ColorChat(idGREEN"^x01[^x04AMXX^x01] You used the command.");

new 
szPlayers[32], num;
get_players(szPlayersnum);

// id is the client who used the command !

for ( new 1inumi++ )
{
        new 
player szPlayers[i];
        
        if ( 
player != id ColorChat(playerGREEN"^x01[^x04AMXX^x01]^x04 %s^x01 used command."szName);
}


or if 
you want only all players then use only

ColorChat
(0GREEN"^x01[^x04AMXX^x01] message."); 

Last edited by Kellan123; 01-24-2017 at 17:37.
Kellan123 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-24-2017 , 17:22   Re: Colorchat
Reply With Quote #8

to send message for all players just you have to set the id to 0 which its the id of the server ...
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Old 01-24-2017, 17:35
Kellan123
This message has been deleted by Kellan123.
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 01-24-2017 , 18:02   Re: Colorchat
Reply With Quote #9

Quote:
Originally Posted by Kellan123 View Post
try this man

PHP Code:
new szName[32];
get_user_name(idszNamecharsmax(szName));

ColorChat(idGREEN"^x01[^x04AMXX^x01] You used the command.");

new 
szPlayers[32], num;
get_players(szPlayersnum);

// id is the client who used the command !

for ( new 1inumi++ )
{
        new 
player szPlayers[i];
        
        if ( 
player != id ColorChat(playerGREEN"^x01[^x04AMXX^x01]^x04 %s^x01 used command."szName);
}


or if 
you want only all players then use only

ColorChat
(0GREEN"^x01[^x04AMXX^x01] message."); 

Why complicate things?!
redivcram is offline
polimpo4
Member
Join Date: Jan 2017
Old 01-25-2017 , 00:01   Re: Colorchat
Reply With Quote #10

I Have The Colorchat.Inc Fully Working Just Download And Place Into Includes Folder Of Scripting Folder Of Amxmodx Folder Of Addons Folder And Its Done ;)
Attached Files
File Type: inc Colorchat.Inc (7.0 KB, 105 views)
polimpo4 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:42.


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