AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Colorchat (https://forums.alliedmods.net/showthread.php?t=293154)

InteX01 01-24-2017 10:55

Colorchat
 
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 :P
Im noob :/

MaXs 01-24-2017 11:12

Re: Colorchat
 
you want make plugin yourself? actually you can use amx_say

InteX01 01-24-2017 11:18

Re: Colorchat
 
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.

OciXCrom 01-24-2017 13:07

Re: Colorchat
 
ColorChat(id = > ColorChat(0

MaXs 01-24-2017 15:16

Re: Colorchat
 
I dont recommend using this because of spam maybe add some flags that will allow only for vip/admin doing this.

OciXCrom 01-24-2017 16:01

Re: Colorchat
 
Quote:

Originally Posted by MaXs (Post 2489573)
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.

Kellan123 01-24-2017 17:18

Re: Colorchat
 
try this man :D

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."); 


Natsheh 01-24-2017 17:22

Re: Colorchat
 
to send message for all players just you have to set the id to 0 which its the id of the server ...

redivcram 01-24-2017 18:02

Re: Colorchat
 
Quote:

Originally Posted by Kellan123 (Post 2489610)
try this man :D

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?!

polimpo4 01-25-2017 00:01

Re: Colorchat
 
1 Attachment(s)
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 ;)


All times are GMT -4. The time now is 20:42.

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