This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vikassharma
BANNED
Join Date: Dec 2011
Location: INDIA
Old 07-14-2013 , 10:31   How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #1

How to add colors in a plugin without colorchat.inc include, i mean how to do with amxmod.inc ?
vikassharma is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-14-2013 , 10:55   Re: How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #2

amxmod.inc or amxmodx.inc ??
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 07-14-2013 , 11:10   Re: How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #3

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(); 

Last edited by akcaliberg; 07-14-2013 at 11:58.
akcaliberg is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 07-14-2013 , 11:11   Re: How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #4

Quote:
Originally Posted by akcaliberg View Post
write_string(" ^1Yellow message
con_color *

Last edited by guipatinador; 07-14-2013 at 11:11.
guipatinador is offline
K1d0x
Senior Member
Join Date: Apr 2012
Location: Copenhagen, Denmark
Old 07-14-2013 , 11:13   Re: How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #5

Include .inc in .sma, and you solve the problem
__________________
I Hate people who can hate me !
K1d0x is offline
Send a message via Yahoo to K1d0x Send a message via Skype™ to K1d0x
Row
BANNED
Join Date: Jun 2013
Location: Romania
Old 07-14-2013 , 11:25   Re: How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #6

Quote:
Originally Posted by vikassharma View Post
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();
   }
  }
 }

Row is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 07-14-2013 , 11:57   Re: How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #7

Quote:
Originally Posted by K1d0x View Post
Include .inc in .sma, and you solve the problem
Quote:
Originally Posted by vikassharma View Post
How to add colors in a plugin without colorchat.inc include, i mean how to do with amxmod.inc ?
akcaliberg is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-14-2013 , 11:59   Re: How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #8

Quote:
Originally Posted by akcaliberg View Post
quotes
You misunderstood him. Kia said to copy the contents of the INC into the SMA
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 07-14-2013 at 11:59.
YamiKaitou is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 07-14-2013 , 14:34   Re: How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #9

Oh, i got it now. Sorry for misunderstanding

But I think vikassharma asked about the code that colors the text.
akcaliberg is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-15-2013 , 18:28   Re: How to add colors in plugin without [COLORCHAT.INC]
Reply With Quote #10

Quote:
Originally Posted by akcaliberg View Post
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.
__________________
fysiks 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 22:54.


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