Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Include: "http://pastebin.com/ZUrWWheV"
- */
- #include <amxmodx>
- #define PLUGIN "Chat Color Base"
- #define VERSION "1.0"
- #define AUTHOR "Sugisaki"
- new MsgIdSayText
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- MsgIdSayText = get_user_msgid("SayText")
- }
- public plugin_natives()
- {
- register_native("chat_color", "native_chat_color")
- }
- public native_chat_color(plugin, params)
- {
- new id = get_param(1), msg_type = get_param(2), buffer[192]
- get_string(3, buffer, charsmax(buffer))
- vdformat(buffer, charsmax(buffer), 3, 4)
- replace_all(buffer, charsmax(buffer), "!t", "^3")
- replace_all(buffer, charsmax(buffer), "!n", "^1")
- replace_all(buffer, charsmax(buffer), "!g", "^4")
- message_begin(id ? msg_type : MSG_ALL, MsgIdSayText, {0, 0, 0}, id ? id : 0)
- write_byte(id ? id : 33)
- write_string(buffer)
- message_end()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement