Page 1 of 1

Padėkit

Posted: 2013 Apr 08 12:58
by Dom1s
Image

Galit sutaisyt? Kas nors.. Meginau ir alliedmods bet nieko..

Code: Select all

#include <amxmodx>#include <cstrike> // Флаги#define ADMIN_FLAG ADMIN_BAN // d#define MODER_FLAG ADMIN_LEVEL_u // m#define VIP_FLAG ADMIN_LEVEL_H // t // Теги// Цвета:// !y - желтый// !g - зеленый// !t - цвет команды(красный, синий, белый - террорист, контр, зритель)new ADMIN_TAG[64]new MODER_TAG[64]new VIP_TAG[64] // Расположение тега, "pre"(до) или "after"(после) никаnew ADMIN_TAG_PLACE[64]new MODER_TAG_PLACE[64]new VIP_TAG_PLACE[64] // Команды вывода админов, модеров, виповnew ADMINS_CMD[64]new MODERS_CMD[64]new VIPS_CMD[64] new ADMINS_TEXT1[64]new MODERS_TEXT1[64]new VIPS_TEXT1[64] new ADMINS_TEXT2[64]new MODERS_TEXT2[64]new VIPS_TEXT2[64] #define MAX_LANG_ARGS    5 enum{    PRINT_COLOR_GREY,    PRINT_COLOR_RED,    PRINT_COLOR_BLUE,    PRINT_COLOR_PLAYERTEAM} static const g_aszTeamNames[][] ={    "UNASSIGNED",    "TERRORIST",    "CT",    "SPECTATOR"} new g_maxplayers, admin_see, moder_see public plugin_init(){    // Теги    // Цвета:    // !y - желтый    // !g - зеленый    // !t - цвет команды(красный, синий, белый - террорист, контр, зритель)    register_cvar("chat_admintag", "!g[ADMIN]")    register_cvar("chat_modertag", "!g[SuperADMIN]")    register_cvar("chat_viptag", "!g[VIP]")        // Расположение тега, "pre"(до) или "after"(после) ника    register_cvar("chat_admintagplace", "pre")    register_cvar("chat_modertagplace", "pre")    register_cvar("chat_viptagplace", "pre")        // Команды вывода    register_cvar("chat_adminscmd", "say /admins")        register_cvar("chat_moderscmd", "say /sadmin")    register_cvar("chat_vipscmd", "say /vips")        // Текст вывода, если онлайн    register_cvar("chat_adminstext1", "!tPrisijungę Adminai: !g")    register_cvar("chat_moderstext1", "!tPrisijungę SuperAdminai: !g")    register_cvar("chat_vipstext1", "!tPrisijungę VIP: !g")     // Текст вывода, если оффлайн    register_cvar("chat_adminstext2", "!tŠiuo metu nėra prisijungusių Adminu.")    register_cvar("chat_moderstext2", "!tŠiuo metu nėra prisijungusių SuperAdminu.")    register_cvar("chat_vipstext2", "!tŠiuo metu nėra prisijungusių VIP.")        get_cvar_string("chat_admintag", ADMIN_TAG, charsmax(ADMIN_TAG))    get_cvar_string("chat_modertag", MODER_TAG, charsmax(MODER_TAG))    get_cvar_string("chat_viptag", VIP_TAG, charsmax(VIP_TAG))     get_cvar_string("chat_admintagplace", ADMIN_TAG_PLACE, charsmax(ADMIN_TAG_PLACE))    get_cvar_string("chat_modertagplace", MODER_TAG_PLACE, charsmax(MODER_TAG_PLACE))    get_cvar_string("chat_viptagplace", VIP_TAG_PLACE, charsmax(VIP_TAG_PLACE))     get_cvar_string("chat_adminstext1", ADMINS_TEXT1, charsmax(ADMINS_TEXT1))    get_cvar_string("chat_moderstext1", MODERS_TEXT1, charsmax(MODERS_TEXT1))    get_cvar_string("chat_vipstext1", VIPS_TEXT1, charsmax(VIPS_TEXT1))     get_cvar_string("chat_adminstext2", ADMINS_TEXT2, charsmax(ADMINS_TEXT2))    get_cvar_string("chat_moderstext2", MODERS_TEXT2, charsmax(MODERS_TEXT2))    get_cvar_string("chat_vipstext2", VIPS_TEXT2, charsmax(VIPS_TEXT2))     if((!equal(ADMIN_TAG_PLACE, "after") && !equal(ADMIN_TAG_PLACE, "pre")) || (!equal(MODER_TAG_PLACE, "after") && !equal(MODER_TAG_PLACE, "pre")) || (!equal(VIP_TAG_PLACE, "after") && !equal(VIP_TAG_PLACE, "pre")))        pause("a")        get_cvar_string("chat_adminscmd", ADMINS_CMD, charsmax(ADMINS_CMD))    get_cvar_string("chat_moderscmd", MODERS_CMD, charsmax(MODERS_CMD))    get_cvar_string("chat_vipscmd", VIPS_CMD, charsmax(VIPS_CMD))     register_plugin("Chat Addon", "0.2", "Chaiker")        admin_see = register_cvar("chat_adminsee", "1")    moder_see = register_cvar("chat_modersee", "1")        g_maxplayers = get_maxplayers()        if(!equal(ADMINS_CMD, ""))        register_clcmd(ADMINS_CMD, "cmdadmins")    if(!equal(MODERS_CMD, ""))        register_clcmd(MODERS_CMD, "cmdmoders")    if(!equal(VIPS_CMD, ""))        register_clcmd(VIPS_CMD, "cmdvips")     register_clcmd("say", "cmdsay")    register_clcmd("say_team", "cmdteamsay")     return PLUGIN_CONTINUE} public cmdadmins(id){    new count = 0, Temp[64]    for(new i = 1; i <= g_maxplayers; i++)    {        if(get_user_flags(i) & ADMIN_FLAG)        {            new name[32]            get_user_name(i, name, 31)            if(count == 0)            {                format(Temp, 63, "%s%s", ADMINS_TEXT1, name)            } else            {                format(Temp, 63, "%s!t, !g%s", Temp, name)            }            count++        }    }    if(count > 0)        PrintChatColor(id, PRINT_COLOR_PLAYERTEAM + id, "%s", Temp)    else        PrintChatColor(id, PRINT_COLOR_PLAYERTEAM + id, "%s", ADMINS_TEXT2)} public cmdmoders(id){    new count = 0, Temp[64]    for(new i = 1; i <= g_maxplayers; i++)    {        if(get_user_flags(i) & MODER_FLAG && !(get_user_flags(id) & ADMIN_FLAG))        {            new name[32]            get_user_name(i, name, 31)            if(count == 0)            {                format(Temp, 63, "%s%s", MODERS_TEXT1, name)            } else            {                format(Temp, 63, "%s!t, !g%s", Temp, name)            }            count++        }    }    if(count > 0)        PrintChatColor(id, PRINT_COLOR_PLAYERTEAM + id, "%s", Temp)    else        PrintChatColor(id, PRINT_COLOR_PLAYERTEAM + id, "%s", MODERS_TEXT2)} public cmdvips(id){    new count = 0, Temp[64]    for(new i = 1; i <= g_maxplayers; i++)    {        if(get_user_flags(i) & VIP_FLAG && !(get_user_flags(i) & MODER_FLAG || get_user_flags(id) & ADMIN_FLAG))        {            new name[32]            get_user_name(i, name, 31)            if(count == 0)            {                format(Temp, 63, "%s%s", VIPS_TEXT1, name)            } else            {                format(Temp, 63, "%s!t, !g%s", Temp, name)            }            count++        }    }    if(count > 0)        PrintChatColor(id, PRINT_COLOR_PLAYERTEAM + id, "%s", Temp)    else        PrintChatColor(id, PRINT_COLOR_PLAYERTEAM + id, "%s", VIPS_TEXT2)} public cmdsay(id){    if(get_user_flags(id) & ADMIN_FLAG)    {        new Arg[128], check[128], name[32], Temp = '"', Finded = false        get_user_name(id, name, 31)        read_args(Arg, 127)        for(new i = 127; 0 < i <= 127; i--)        {            if(Finded)                continue            if(Arg[i] == Temp)            {                //server_print("%s - %c", Arg[i], Temp)                Arg[i] = 0                Finded = true                continue            }            //server_print("%d - %s", i, Arg[i])        }        format(check, 127, "%s", Arg[1])        if(equal(check, ""))            return PLUGIN_HANDLED        if(is_user_alive(id))        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if(is_user_alive(i) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                {                    if(equal(ADMIN_TAG_PLACE, "after"))                        PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!t%s %s !y:  %s", name, ADMIN_TAG, Arg[1])                    else                        PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "%s !t%s !y:  %s", ADMIN_TAG, name, Arg[1])                }            }        } else        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if(!is_user_alive(i) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                {                    if(cs_get_user_team(id) != CS_TEAM_SPECTATOR)                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* !t%s %s !y:  %s", name, ADMIN_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* %s !t%s !y:  %s", ADMIN_TAG, name, Arg[1])                    } else                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*Stebėtojas* !t%s %s !y:  %s", name, ADMIN_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*Stebėtojas* %s !t%s !y:  %s", ADMIN_TAG, name, Arg[1])                    }                }            }        }        return PLUGIN_HANDLED    } else if(get_user_flags(id) & MODER_FLAG)    {        new Arg[128], check[128], name[32], Temp = '"', Finded = false        get_user_name(id, name, 31)        read_args(Arg, 127)        for(new i = 127; 0 < i <= 127; i--)        {            if(Finded)                continue            if(Arg[i] == Temp)            {                //server_print("%s - %c", Arg[i], Temp)                Arg[i] = 0                Finded = true                continue            }            //server_print("%d - %s", i, Arg[i])        }        format(check, 127, "%s", Arg[1])        if(equal(check, ""))            return PLUGIN_HANDLED        if(is_user_alive(id))        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if(is_user_alive(i) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                {                    if(equal(MODER_TAG_PLACE, "after"))                        PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!t%s %s !y:  %s", name, MODER_TAG, Arg[1])                    else                        PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "%s !t%s !y:  %s", MODER_TAG, name, Arg[1])                }            }        } else        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if(!is_user_alive(i) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                {                    if(cs_get_user_team(id) != CS_TEAM_SPECTATOR)                    {                        if(equal(MODER_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* !t%s %s !y:  %s", name, MODER_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* %s !t%s !y:  %s", MODER_TAG, name, Arg[1])                    } else                    {                        if(equal(MODER_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*Stebėtojas* !t%s %s !y:  %s", name, MODER_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*Stebėtojas* %s !t%s !y:  %s", MODER_TAG, name, Arg[1])                    }                }            }        }        return PLUGIN_HANDLED    } else if(get_user_flags(id) & VIP_FLAG)    {        new Arg[128], check[128], name[32], Temp = '"', Finded = false        get_user_name(id, name, 31)        read_args(Arg, 127)        for(new i = 127; 0 < i <= 127; i--)        {            if(Finded)                continue            if(Arg[i] == Temp)            {                //server_print("%s - %c", Arg[i], Temp)                Arg[i] = 0                Finded = true                continue            }            //server_print("%d - %s", i, Arg[i])        }        format(check, 127, "%s", Arg[1])        if(equal(check, ""))            return PLUGIN_HANDLED        if(is_user_alive(id))        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if(is_user_alive(i) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                {                    if(equal(VIP_TAG_PLACE, "after"))                        PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!t%s %s !y:  %s", name, VIP_TAG, Arg[1])                    else                        PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "%s !t%s !y:  %s", VIP_TAG, name, Arg[1])                }            }        } else        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if(!is_user_alive(i) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                {                    if(cs_get_user_team(id) != CS_TEAM_SPECTATOR)                    {                        if(equal(VIP_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* !t%s %s !y:  %s", name, VIP_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* %s !t%s !y:  %s", VIP_TAG, name, Arg[1])                    } else                    {                        if(equal(VIP_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*Stebėtojas* !t%s %s !y:  %s", name, VIP_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*Stebėtojas* %s !t%s !y:  %s", VIP_TAG, name, Arg[1])                    }                }            }        }        return PLUGIN_HANDLED    } else    {        new Arg[128], check[128], name[32], Temp = '"', Finded = false        get_user_name(id, name, 31)        read_args(Arg, 127)        for(new i = 127; 0 < i <= 127; i--)        {            if(Finded)                continue            if(Arg[i] == Temp)            {                //server_print("%s - %c", Arg[i], Temp)                Arg[i] = 0                Finded = true                continue            }            //server_print("%d - %s", i, Arg[i])        }        format(check, 127, "%s", Arg[1])        if(equal(check, ""))            return PLUGIN_HANDLED        if(is_user_alive(id))        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if(is_user_alive(i) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!t%s !y:  %s", name, Arg[1])            }        } else        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if(!is_user_alive(i) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* !t%s !y:  %s", name, Arg[1])            }        }    }    return PLUGIN_HANDLED} public cmdteamsay(id){    if(get_user_flags(id) & ADMIN_FLAG)    {        new Arg[128], check[128], name[32], Temp = '"', Finded = false        get_user_name(id, name, 31)        read_args(Arg, 127)        for(new i = 127; 0 < i <= 127; i--)        {            if(Finded)                continue            if(Arg[i] == Temp)            {                //server_print("%s - %c", Arg[i], Temp)                Arg[i] = 0                Finded = true                continue            }            //server_print("%d - %s", i, Arg[i])        }        format(check, 127, "%s", Arg[1])        if(equal(check, ""))            return PLUGIN_HANDLED        if(cs_get_user_team(id) == CS_TEAM_CT)        {            if(is_user_alive(id))            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Gaudytojas) !t%s %s !y:  %s", name, ADMIN_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Gaudytojas) %s !t%s !y:  %s", ADMIN_TAG, name, Arg[1])                    }                }            } else            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) !t%s %s !y:  %s", name, ADMIN_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) %s !t%s !y:  %s", ADMIN_TAG, name, Arg[1])                    }                }            }        }        if(cs_get_user_team(id) == CS_TEAM_T)        {            if(is_user_alive(id))            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Bėglys) !t%s %s !y:  %s", name, ADMIN_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Bėglys) %s !t%s !y:  %s", ADMIN_TAG, name, Arg[1])                    }                }            } else            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Bėglys) !t%s %s !y:  %s", name, ADMIN_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Bėglys) %s !t%s !y:  %s", ADMIN_TAG, name, Arg[1])                    }                }            }        }        if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)        {            for(new i = 1; i <= g_maxplayers; i++)                if(is_user_connected(i))                    if(cs_get_user_team(i) == CS_TEAM_SPECTATOR || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Stebėtojas) !t%s %s !y:  %s", name, ADMIN_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Stebėtojas) %s !t%s !y:  %s", ADMIN_TAG, name, Arg[1])                    }        }        return PLUGIN_HANDLED    } else if(get_user_flags(id) & MODER_FLAG)    {        new Arg[128], check[128], name[32], Temp = '"', Finded = false        get_user_name(id, name, 31)        read_args(Arg, 127)        for(new i = 127; 0 < i <= 127; i--)        {            if(Finded)                continue            if(Arg[i] == Temp)            {                //server_print("%s - %c", Arg[i], Temp)                Arg[i] = 0                Finded = true                continue            }            //server_print("%d - %s", i, Arg[i])        }        format(check, 127, "%s", Arg[1])        if(equal(check, ""))            return PLUGIN_HANDLED        if(cs_get_user_team(id) == CS_TEAM_CT)        {            if(is_user_alive(id))            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Gaudytojas) !t%s %s !y:  %s", name, MODER_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Gaudytojas) %s !t%s !y:  %s", MODER_TAG, name, Arg[1])                    }                }            } else            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) !t%s %s !y:  %s", name, MODER_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) %s !t%s !y:  %s", MODER_TAG, name, Arg[1])                    }                }            }        }        if(cs_get_user_team(id) == CS_TEAM_T)        {            if(is_user_alive(id))            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Bėglys) !t%s %s !y:  %s", name, MODER_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Bėglys) %s !t%s !y:  %s", MODER_TAG, name, Arg[1])                    }                }            } else            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Bėglys) !t%s %s !y:  %s", name, MODER_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Bėglys) %s !t%s !y:  %s", MODER_TAG, name, Arg[1])                    }                }            }        }        if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(is_user_connected(i))                {                    if(cs_get_user_team(i) == CS_TEAM_SPECTATOR || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(ADMIN_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Stebėtojas) !t%s %s !y:  %s", name, MODER_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Stebėtojas) %s !t%s !y:  %s", MODER_TAG, name, Arg[1])                    }                }            }        }        return PLUGIN_HANDLED    } else if(get_user_flags(id) & VIP_FLAG)    {        new Arg[128], check[128], name[32], Temp = '"', Finded = false        get_user_name(id, name, 31)        read_args(Arg, 127)        for(new i = 127; 0 < i <= 127; i--)        {            if(Finded)                continue            if(Arg[i] == Temp)            {                //server_print("%s - %c", Arg[i], Temp)                Arg[i] = 0                Finded = true                continue            }            //server_print("%d - %s", i, Arg[i])        }        format(check, 127, "%s", Arg[1])        if(equal(check, ""))            return PLUGIN_HANDLED        if(cs_get_user_team(id) == CS_TEAM_CT)        {            if(is_user_alive(id))            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(VIP_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Gaudytojas) !t%s !y%s :  %s", name, VIP_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Gaudytojas) %s !t%s !y:  %s", VIP_TAG, name, Arg[1])                    }                }            } else            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(VIP_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) !t%s !y%s :  %s", name, VIP_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) %s !t%s !y:  %s", VIP_TAG, name, Arg[1])                    }                }            }        }        if(cs_get_user_team(id) == CS_TEAM_T)        {            if(is_user_alive(id))            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                        PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Terrorist) !t%s !y%s :  %s", name, VIP_TAG, Arg[1])                    if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(VIP_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) !t%s !y%s :  %s", name, VIP_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) %s !t%s !y:  %s", VIP_TAG, name, Arg[1])                    }                }            } else            {                for(new i = 1; i <= g_maxplayers; i++)                {                    if(!is_user_connected(i))                        continue                    if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(VIP_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) !t%s !y%s :  %s", name, VIP_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) %s !t%s !y:  %s", VIP_TAG, name, Arg[1])                    }                }            }        }        if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(is_user_connected(i))                {                    if(cs_get_user_team(i) == CS_TEAM_SPECTATOR || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                        PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Spectator) !t%s !y%s :  %s", name, VIP_TAG, Arg[1])                    if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    {                        if(equal(VIP_TAG_PLACE, "after"))                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Stebėtojas) !t%s !y%s :  %s", name, VIP_TAG, Arg[1])                        else                            PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Stebėtojas) %s !t%s !y:  %s", VIP_TAG, name, Arg[1])                    }                }            }        }        return PLUGIN_HANDLED    } else    {        new Arg[128], check[128], name[32], Temp = '"', Finded = false        get_user_name(id, name, 31)        read_args(Arg, 127)        for(new i = 127; 0 < i <= 127; i--)        {            if(Finded)                continue            if(Arg[i] == Temp)            {                //server_print("%s - %c", Arg[i], Temp)                Arg[i] = 0                Finded = true                continue            }            //server_print("%d - %s", i, Arg[i])        }        format(check, 127, "%s", Arg[1])        if(equal(check, ""))            return PLUGIN_HANDLED        if(is_user_alive(id))        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T && cs_get_user_team(id) == CS_TEAM_T) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Bėglys) !t%s !y:  %s", name, Arg[1])                else if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT && cs_get_user_team(id) == CS_TEAM_CT) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Gaudytojas) !t%s !y:  %s", name, Arg[1])                else if((is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_SPECTATOR && cs_get_user_team(id) == CS_TEAM_SPECTATOR) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Stebėtojas) !t%s !y:  %s", name, Arg[1])            }        } else        {            for(new i = 1; i <= g_maxplayers; i++)            {                if(!is_user_connected(i))                    continue                if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T && cs_get_user_team(id) == CS_TEAM_T) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Bėglys) !t%s !y:  %s", name, Arg[1])                else if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT && cs_get_user_team(id) == CS_TEAM_CT) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y*MIRES* (Gaudytojas) !t%s !y:  %s", name, Arg[1])                else if((!is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_SPECTATOR && cs_get_user_team(id) == CS_TEAM_SPECTATOR) || (get_pcvar_num(moder_see) && get_user_flags(i) & MODER_FLAG) || (get_pcvar_num(admin_see) && get_user_flags(i) & ADMIN_FLAG))                    PrintChatColor(i, PRINT_COLOR_PLAYERTEAM + id, "!y(Stebėtojas) !t%s !y:  %s", name,  Arg[1])            }        }    }    return PLUGIN_HANDLED} stock PrintChatColor(pReceiver, iColor = PRINT_COLOR_PLAYERTEAM, const szMessage[], any:...){    new szBuffer[256]    new iArgs = numargs()     if(pReceiver)    {        for(new iArg = 3; iArg < iArgs; iArg++)        {            if(getarg(iArg) != LANG_PLAYER)                continue             setarg(iArg, _, pReceiver)        }         vformat(szBuffer, 255, szMessage, 4)         while (replace(szBuffer, 255, "!y", "^1")) {}        while (replace(szBuffer, 255, "!t", "^3")) {}        while (replace(szBuffer, 255, "!g", "^4")) {}         if (iColor >= PRINT_COLOR_PLAYERTEAM)            UTIL_SayText(MSG_ONE, _, pReceiver, (iColor > PRINT_COLOR_PLAYERTEAM) ? iColor - PRINT_COLOR_PLAYERTEAM : pReceiver, szBuffer)        else        {            new iTeam = _:cs_get_user_team(pReceiver)             if(iTeam % 3 == iColor)                UTIL_SayText(MSG_ONE, _, pReceiver, pReceiver, szBuffer)            else            {                UTIL_TeamInfo(MSG_ONE, _, pReceiver, pReceiver, g_aszTeamNames[iColor])                UTIL_SayText(MSG_ONE, _, pReceiver, pReceiver, szBuffer)                UTIL_TeamInfo(MSG_ONE, _, pReceiver, pReceiver, g_aszTeamNames[iTeam])            }        }    }    else    {        new aiChangeArgs[MAX_LANG_ARGS]        new iChangeArgs, iArg         for(iArg = 3; iArg < iArgs; iArg++)        {            if(getarg(iArg) != LANG_PLAYER)                continue             aiChangeArgs[iChangeArgs++] = iArg             if (iChangeArgs == MAX_LANG_ARGS)                break        }         new apPlayers[32]        new iPlayers        new pPlayer         get_players(apPlayers, iPlayers)         for(new i = 0; i < iPlayers; i++)        {            pPlayer = apPlayers[i]             for(iArg = 0; iArg < iChangeArgs; iArg++)                setarg(aiChangeArgs[iArg], _, pPlayer)             vformat(szBuffer, 255, szMessage, 4)             while (replace(szBuffer, 255, "!y", "^1")) {}            while (replace(szBuffer, 255, "!t", "^3")) {}            while (replace(szBuffer, 255, "!g", "^4")) {}             if(iColor >= PRINT_COLOR_PLAYERTEAM)                UTIL_SayText(MSG_ONE, _, pPlayer, (iColor > PRINT_COLOR_PLAYERTEAM) ? iColor - PRINT_COLOR_PLAYERTEAM : pPlayer, szBuffer)            else            {                new iTeam = _:cs_get_user_team(pPlayer);                 if(iTeam % 3 == iColor)                    UTIL_SayText(MSG_ONE, _, pPlayer, pPlayer, szBuffer)                else                {                    UTIL_TeamInfo(MSG_ONE, _, pPlayer, pPlayer, g_aszTeamNames[iColor])                    UTIL_SayText(MSG_ONE, _, pPlayer, pPlayer, szBuffer)                    UTIL_TeamInfo(MSG_ONE, _, pPlayer, pPlayer, g_aszTeamNames[iTeam])                }            }        }    }} stock UTIL_SayText(iDest, const vecOrigin[3] = {0, 0, 0}, pEntity, pSender, const szMessage[], const szArg1[] = "", const szArg2[] = ""){    static msgSayText        if(!msgSayText)        msgSayText = get_user_msgid("SayText")     message_begin(iDest, msgSayText, vecOrigin, pEntity)    write_byte(pSender)    write_string(szMessage)    if(szArg1[0])    {        write_string(szArg1)                if(szArg2[0])            write_string(szArg2)    }    message_end()} stock UTIL_TeamInfo(iDest, const vecOrigin[3] = { 0, 0, 0 }, pEntity, pPlayer, const szTeamName[]){    static msgTeamInfo        if(!msgTeamInfo)        msgTeamInfo = get_user_msgid("TeamInfo")     message_begin(iDest, msgTeamInfo, vecOrigin, pEntity)    write_byte(pPlayer)    write_string(szTeamName)    message_end()}/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }*/

Re: Padėkit

Posted: 2013 Apr 08 14:09
by Giltinas
Parodyk savo plugins.ini

Re: Padėkit

Posted: 2013 Apr 08 14:35
by Dom1s
Jau susitvarkiau nebereikia.