AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to add colors in plugin without [COLORCHAT.INC] (https://forums.alliedmods.net/showthread.php?t=220784)

vikassharma 07-14-2013 10:31

How to add colors in plugin without [COLORCHAT.INC]
 
How to add colors in a plugin without colorchat.inc include, i mean how to do with amxmod.inc ?

ConnorMcLeod 07-14-2013 10:55

Re: How to add colors in plugin without [COLORCHAT.INC]
 
amxmod.inc or amxmodx.inc ??

akcaliberg 07-14-2013 11:10

Re: How to add colors in plugin without [COLORCHAT.INC]
 
PHP Code:

message_begin(MSG_ONEget_user_msgid("SayText"),_index);
write_byte(index);
write_string(" ^1con_color message, ^3Team-color message, ^4Green message ");
message_end(); 


guipatinador 07-14-2013 11:11

Re: How to add colors in plugin without [COLORCHAT.INC]
 
Quote:

Originally Posted by akcaliberg (Post 1990699)
write_string(" ^1Yellow message

con_color *

K1d0x 07-14-2013 11:13

Re: How to add colors in plugin without [COLORCHAT.INC]
 
Include .inc in .sma, and you solve the problem

Row 07-14-2013 11:25

Re: How to add colors in plugin without [COLORCHAT.INC]
 
Quote:

Originally Posted by vikassharma (Post 1990678)
How to add colors in a plugin without colorchat.inc include, i mean how to do with amxmod.inc ?

PHP Code:

stock color_chat(const id, const input[], any:...)
{
new 
count 1players[32]
static 
msg[191]
vformat(msg190input3)

replace_all(msg190"!g""^4")
replace_all(msg190"!nl""^1")
replace_all(msg190"!et""^3")

if (
idplayers[0] = id; else get_players(playerscount"ch")
{
  for (new 
0counti++)
  {
   if (
is_user_connected(players[i]))
   {
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
    
write_byte(players[i]);
    
write_string(msg);
    
message_end();
   }
  }
 }



akcaliberg 07-14-2013 11:57

Re: How to add colors in plugin without [COLORCHAT.INC]
 
Quote:

Originally Posted by K1d0x (Post 1990703)
Include .inc in .sma, and you solve the problem

Quote:

Originally Posted by vikassharma (Post 1990678)
How to add colors in a plugin without colorchat.inc include, i mean how to do with amxmod.inc ?


YamiKaitou 07-14-2013 11:59

Re: How to add colors in plugin without [COLORCHAT.INC]
 
Quote:

Originally Posted by akcaliberg (Post 1990741)
quotes

You misunderstood him. Kia said to copy the contents of the INC into the SMA

akcaliberg 07-14-2013 14:34

Re: How to add colors in plugin without [COLORCHAT.INC]
 
Oh, i got it now. Sorry for misunderstanding

But I think vikassharma asked about the code that colors the text.

fysiks 07-15-2013 18:28

Re: How to add colors in plugin without [COLORCHAT.INC]
 
Quote:

Originally Posted by akcaliberg (Post 1990841)
But I think vikassharma asked about the code that colors the text.

Just because that is what he wants does not mean that is what he should do. Using the include file is the best way IMO. If it is because he wants it to be able to compile with the webcompiler then he either needs to learn to compile locally or simply copy the code from the include file into the .sma file.


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

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