AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   fantastiko (https://forums.alliedmods.net/showthread.php?t=208804)

fantastiko 02-17-2013 14:34

fantastiko
 
fantastiko

EDUTz 02-17-2013 18:06

Re: possible color chat ?
 
Just an example. Should work.

Code:

#include <amxmodx>
new SayText
public plugin_init()
{
        register_plugin("Chat" , "1.0", "EDUTz")
        register_clcmd("say", "hook_say")
        register_clcmd("say_team", "hook_say")
        SayText = get_user_msgid("SayText")
}

public hook_say(id)
{
        new name[32]
        static text[70]
        get_user_name(id, name, 31)
        read_args(text, sizeof(text)-1);
        remove_quotes(text);
        if(equali(text, "hello", 4))
        {
                format(text, 191, "^x01[%s], ^x04Hello to you too", name)
                message_begin(MSG_ONE, SayText, _, id)
                write_byte(id)               
                write_string(text)
                message_end()
                return PLUGIN_HANDLED
        }
        return PLUGIN_CONTINUE;
}


YamiKaitou 02-18-2013 04:34

Re: possible color chat ?
 
Are you sure HL can even print in colors?

fantastiko 02-18-2013 05:09

Re: possible color chat ?
 
if playing hl teamplay name in chat print with color.

fysiks 04-11-2013 01:16

Re: possible color chat ?
 
Just because the game uses colors in chat doesn't mean you can do it like you would in Counter-Strike. You can't do it the same way as CS in Day of Defeat (it's not even practical to do it at all, I don't know anybody that does).


All times are GMT -4. The time now is 21:47.

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