Anti reklama

Šiame forume vartotojai gali prašyti jiems reikiamo plugino.
Forum rules
Šiame forume galite siūlyti idėjas ar prašyti jums reikalingų pluginų. Jei kas nors pradės jį kurti, tai pasirašys Jūsų sukurtoje temoje. Niekada nepykite, jei niekas neatsako į Jūsų prašymą. Gal tai tiesiog per sudėtinga, arba reikalauja per daug darbo.
Post Reply
User avatar
Cabexxx
Jau po truputį tampa savu
Posts: 101
Joined: 2012 Jul 12 22:56
Location: Vilkaviskis

Anti reklama

Post 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.

User avatar
ArtHa123
Flooderis arba specialistas
Posts: 738
Joined: 2014 Feb 19 18:40

Re: Anti reklama

Post 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();            }        }    }}
Attachments
blockmsg.ini
(37 Bytes) Downloaded 725 times
Image

User avatar
Cabexxx
Jau po truputį tampa savu
Posts: 101
Joined: 2012 Jul 12 22:56
Location: Vilkaviskis

Re: Anti reklama

Post by Cabexxx »

dekui.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests