AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How can I contact the team color? (https://forums.alliedmods.net/showthread.php?t=133728)

CsIosefin 07-28-2010 07:16

How can I contact the team color?
 
Hi, I want to make a plugin, but do not know how to get the color of the team, that when someone types in the chat, to have his name in team color:
CT - BLUE
T - RED
I can help with a solution?
Thanks very much.

Gadzislaw007 07-28-2010 07:22

Re: How can I contact the team color?
 
Well, colorchat module already has function of colouring text by team.

CsIosefin 07-28-2010 07:34

Re: How can I contact the team color?
 
Yes, Counter-Strike already has position, but I put a plugin for instant, when the players are alive, and then color the team does not work, I have to include the plugin, but do not know how to steal the team color. ..

Gadzislaw007 07-28-2010 09:13

Re: How can I contact the team color?
 
So you want to colour every message in chat by the color of team?

CsIosefin 07-28-2010 10:44

Re: How can I contact the team color?
 
No message, the name of the team have color!
So I plugin:
Code:

#include <amxmodx>

public plugin_init()
{
        register_plugin("PsychoListen", "1.0", "PsychoGuard");

        register_clcmd("say", "handle_say");
}

public handle_say(id)
{
        new is_alive = is_user_alive(id);

        static command [17], message [129], name [33], players [32];
        read_argv(0, command, 16);
        read_argv(1, message, 128);

        new player_count = get_playersnum();
        get_players(players, player_count, "c");
        get_user_name(id, name, 32);

        for (new i = 0; i < player_count; i++)
        {
                if (!is_user_alive (players[i]) && is_alive)
                {
                        client_print(players[i], print_chat, "*ALIVE* %s : %s", name, message);
                      }

                if (is_user_alive (players[i]) && !is_alive)
                {
                        client_print(players[i], print_chat, "*DEAD* %s : %s", name, message);
                }
        }

        return PLUGIN_CONTINUE;
}

I want his name to be either red or blue ... I want ...


All times are GMT -4. The time now is 00:18.

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