Page 1 of 1

Anti reklama

Posted: 2015 May 12 08:55
by Cabexxx
Sveiki, reikalingas "anti reklama" pluginas, du radau google taciau kazkodel neveikia, tarkim negalimas zodis: www.

parasnt ji turi pakeisti i tavo reklama, taciau niekas nevyksta.


aciu, gal kas pasiulys veikianti varianta.

Re: Anti reklama

Posted: 2015 May 12 10:26
by ArtHa123

Code: Select all

#include <amxmodx>#include <amxmisc> #define PLUGIN "ANTI AD"#define VERSION "1.0"#define AUTHOR "Playline.lt" new g_Bmsg[100][64], gnum public plugin_init(){    register_plugin(PLUGIN, VERSION, AUTHOR)    register_clcmd("say", "hookSay")     register_clcmd("say_team", "hookSay")        new configsdir[64], file[132]    get_configsdir(configsdir, 63)        format(file, 131, "%s/blockmsg.ini", configsdir)        load_abuse(file)} public load_abuse(path[]){    new file = fopen(path, "rt")        if(!file)    {        server_print("Nepavyko rasti blockmsg.ini failo!")        return PLUGIN_HANDLED    }        new Rtext[64]        while(!feof(file))    {        fgets(file, Rtext, 63)        if(equal(Rtext,""))            continue;                       parse(Rtext, g_Bmsg[gnum], 63)        gnum++    }     fclose(file);    return PLUGIN_CONTINUE} public hookSay(id){    new args[199]    read_args(args, 198)     for(new i = 0; i < gnum; i++)    {        if(contain(args, g_Bmsg[i]) != -1)        {            ChatColor(id, "^4Reklama yra draudziama!" );            return PLUGIN_HANDLED        }    }    return PLUGIN_CONTINUE} stock ChatColor(const id, const input[], any:...){    new count = 1, players[32]    static msg[192]    vformat(msg, 191, input, 3)       replace_all(msg, 191, "!g", "^4") // Green Color    replace_all(msg, 191, "!y", "^1") // Default Color    replace_all(msg, 191, "!t", "^3") // Team Color       if (id) players[0] = id; else get_players(players, count, "ch")    {        for (new i = 0; i < count; i++)        {            if (is_user_connected(players[i]))            {                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])                write_byte(players[i]);                write_string(msg);                message_end();            }        }    }}

Re: Anti reklama

Posted: 2015 May 12 12:15
by Cabexxx
dekui.