Raised This Month: $ Target: $400
 0% 

color post


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sutar
Senior Member
Join Date: Sep 2010
Old 02-04-2013 , 16:42   color post
Reply With Quote #1

Here's the script:
Code:
#include <amxmodx>

public plugin_init() 
{
	register_plugin("Color Chat", "1.5", "Sutar")
	set_task(2.0, "sayspl", 0, "", 0, "b")
}

public sayspl() 
{
	message_begin(MSG_ALL, get_user_msgid("TeamInfo"))
	write_byte(0)
	write_string("TERRORIST")
	message_end()
	
	message_begin(MSG_ALL, get_user_msgid("SayText"))
	write_byte(0)
	write_string("^x03Red color")
	message_end()
}
How to make colored message, without the player id?
Sutar is offline
Cheezpuff
BANNED
Join Date: Oct 2012
Location: City of the Dead
Old 02-04-2013 , 18:43   Re: color post
Reply With Quote #2

Quote:
Originally Posted by Sutar View Post
Here's the script:
Code:
#include <amxmodx>

public plugin_init() 
{
    register_plugin("Color Chat", "1.5", "Sutar")
    set_task(2.0, "sayspl", 0, "", 0, "b")
}

public sayspl() 
{
    message_begin(MSG_ALL, get_user_msgid("TeamInfo"))
    write_byte(0)
    write_string("TERRORIST")
    message_end()
    
    message_begin(MSG_ALL, get_user_msgid("SayText"))
    write_byte(0)
    write_string("^x03Red color")
    message_end()
}
How to make colored message, without the player id?
why you used
PHP Code:
^x03Red color 
and not a normal colorchat?

for Colored Message -.-?

Last edited by Cheezpuff; 02-04-2013 at 22:18.
Cheezpuff is offline
Send a message via Skype™ to Cheezpuff
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-04-2013 , 21:08   Re: color post
Reply With Quote #3

Quote:
Originally Posted by Sutar View Post
How to make colored message, without the player id?
What?
__________________
fysiks is offline
Sutar
Senior Member
Join Date: Sep 2010
Old 02-05-2013 , 09:00   Re: color post
Reply With Quote #4

Quote:
Originally Posted by Cheezpuff View Post
why you used
PHP Code:
^x03Red color 
and not a normal colorchat?
for Colored Message -.-?
In the codes, many checks. I do not need.

Quote:
Originally Posted by fysiks View Post
What?
In the chat to be red message Red color for all players.
But in write_byte() You must specify the id player.
if id = 0, then no colored posts. How can you make sure that it is colored, no player id?
Sutar is offline
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 02-05-2013 , 09:58   Re: color post
Reply With Quote #5

You can not use write_byte() command like client_print(). You have to use write_byte with id of player. In case of all players you should loop though all of them. That's the way.

Last edited by hypheni; 02-05-2013 at 09:59.
hypheni is offline
Send a message via Skype™ to hypheni
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:36.


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