RPG Trail Color

RPG Trail Color 1.1

Нет прав для скачивания
Код:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "RPG Trail Color"
#define VERSION "1.1"
#define AUTHOR "LetiLetiLepestok"

new g_Colors[5][3] =
{
    {0, 0, 0},
    {80, 80, 255},        // color for team 1
    {255, 80, 80},        // color for team 2
    {200, 200, 80},        // color for team 3
    {80, 200, 80}        // color for team 4
}

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_message(SVC_TEMPENTITY, "MessageTempEntity");
}

public MessageTempEntity()
{
    if(get_msg_arg_int(1) != TE_BEAMFOLLOW)
        return PLUGIN_CONTINUE
        
    new classname[32]
    new ent = get_msg_arg_int(2)
    pev(ent, pev_classname, classname, 31)

    if(!equal(classname, "rpg_rocket"))
        return PLUGIN_CONTINUE
    
    new team = get_user_team(pev(ent, pev_owner))
    
    if(team <= 0 || team > 4)
    {
        team = 0
        g_Colors[0][0] = random_num(0, 255)
        g_Colors[0][1] = random_num(0, 255)
        g_Colors[0][2] = random_num(0, 255)
    }

    set_msg_arg_int(6, ARG_BYTE, g_Colors[team][0])
    set_msg_arg_int(7, ARG_BYTE, g_Colors[team][1])
    set_msg_arg_int(8, ARG_BYTE, g_Colors[team][2])
    set_msg_arg_int(9, ARG_BYTE, 255)
    
    return PLUGIN_CONTINUE
}
Назад
Верх