Quote:
Originally Posted by thEsp
1. Create a 2-dimensional array where you have the desired match (e.g "mr") and desired modification (e.g "&x04mr").
2. When a client says something loop through that array and check if the said text matches any pattern.
3. If it does: replace the message, print it to all players/teammates and return PLUGIN_HANDLED.
|
But I don't know exactly what code to use, And I ask you for help
The image you see was possible with the following plugin
Code:
#include <amxmodx>
#include <amxmisc>
#include <cromchat>
#define PLUGIN "Word Color"
#define VERSION "1.0"
#define AUTHOR "author"
new message[192]
new strName[191]
new strText[191]
new alive[11]
public plugin_init()
{
register_plugin (PLUGIN, VERSION, AUTHOR)
register_clcmd ("say", "cmdSay")
}
public cmdSay(id)
{
new message[192], name[32], players[32], isAlive
read_args(message, 191)
remove_quotes(message)
get_user_name(id, name, 31)
if (is_user_alive (id))
{
isAlive = 1
alive = "^x01"
}
else
{
isAlive = 0
alive = "^x01*DEAD* "
}
CC_SendMessage(0, "%s&x05%s &x01: &x04%s", alive, name, message[1])
return PLUGIN_HANDLED;
}
Code:
say hHello &x05Mr = For Image 1
say hHello &x05Mr&x04 King | Good Game &x05mr = for Image 2
I don't want the player to add this text ( &x05mr&x04 )
( I need to send this post to the Scripting Help section?? )