plugin.ini
; AMX Mod X plugins ; Admin Base - Always one has to be activated minibans.amxx admin.amxx ; admin base (required for any admin-related) ;admin_sql.amxx ; admin base - SQL version (comment admin.amxx) ; Basic admincmd.amxx ; basic admin console commands adminhelp.amxx ; help command for admin console commands adminslots.amxx ; slot reservation multilingual.amxx ; Multi-Lingual management ; Menus menufront.amxx ; front-end for admin menus cmdmenu.amxx ; command menu (speech, settings) plmenu.amxx ; players menu (kick, ban, client cmds.) telemenu.amxx ;teleport menu (Fun Module required!) mapsmenu.amxx ; maps menu (vote, changelevel) pluginmenu.amxx ; Menus for commands/cvars organized by plugin ; Chat / Messages adminchat.amxx ; console chat commands antiflood.amxx ; prevent clients from chat-flooding the server scrollmsg.amxx ; displays a scrolling message imessage.amxx ; displays information messages adminvote.amxx ; vote commands ; Map related nextmap.amxx ; displays next map in mapcycle timeleft.amxx ; displays time left on map ; Configuration pausecfg.amxx ; allows to pause and unpause some plugins statscfg.amxx ; allows to manage stats plugins via menu and commands ; Counter-Strike restmenu.amxx ; restrict weapons menu statsx.amxx ; stats on death or round end (CSX Module required!) ;miscstats.amxx ; bunch of events announcement for Counter-Strike ;stats_logging.amxx ; weapons stats logging (CSX Module required!) ; Enable to use AMX Mod plugins ;amxmod_compat.amxx ; AMX Mod backwards compatibility layer ; Custom - Add 3rd party plugins here dbmod_5.9l.amxx debug simple_force_rate.amxx no_he_damage.amxx anti_nick_change.amxx invisible_spectator.amxx adminlisten.amxx hudhp.amxx amx_record.amxx c4timer.amxx abd.amxx interp.amxx join_leave.amxx ptb.amxx amx_ssban.amxx interp_v3.amxx admin_gag.amxx admin_spec_esp.amxx ad_manager.amx mapchooser4.amxx ;Voices_Management.amxx ; proszę nie wgrywac tego pluginu, generuje on zbyt duze obciazenia / Administrator OwnServer
advertisements.ini
;!t - kolor drużyny, dla tt czerwony, dla ct niebieski i dla specra biały ;!g - po prostu zielony ;!n - standardowy kolor w say !t Witamy na DiabloMod ModernClassic !n zapraszamy rowniez na nasze forum www.CounterTime.xaa.pl !g Wpisz /klasa aby wybrac klase. /item aby zobaczyc jaki masz item /drop aby wyrzucic item !t Witamy na DiabloMod ModernClassic !n zapraszamy rowniez na nasze forum www.CounterTime.xaa.pl !g Wpisz /klasa aby wybrac klase. /item aby zobaczyc jaki masz item /drop aby wyrzucic item !n proszę o zapoznanie sie z pelnym regulaminem serwera na stronie www.CounterTime.xaa.pl !n proszę o zapoznanie sie z pelnym regulaminem serwera na stronie www.CounterTime.xaa.pl !t proszę o stosowanie sie do regulaminu serwera !n Chcesz doniesc na admina? Masz pomysl co mozna by zmienic napisz na forum.
Co jest nie tak??
Dodano 18 marzec 2011 - 19:15:
ad_manager.sma
#include <amxmodx>
#include <amxmisc>
#pragma semicolon 1
new const PLUGIN[] = "Autoresponder/Advertiser";
new const VERSION[] = "0.5";
new const AUTHOR[] = "MaximusBrood";
#define NORM_AD 0
#define SAY_AD 1
#define COND 0
#define STORE 1
#define COND_TKN '%'
#define SAY_TKN '@'
#define COND_STKN "%"
#define DEVIDE_STKN "~"
#define SAY_STKN "@"
//-.-.-.-.-.-.-.-.DEFINES.-.-.-.-.-.-.-.-.-.-.
//Maximum amount of ads
#define MAXADS 64
//Minimum difference between two different ads (float)
new const Float:RAND_MIN = 16.0;
//Maximum difference between two different ads (float)
new const Float:RAND_MAX = 15.0;
//-.-.-.-.-.-.-.-.END DEFINES..-.-.-.-.-.-.-.
//Stores
new sayConditions[MAXADS][3][32];
new normConditions[MAXADS][3][32];
new normStore[MAXADS][128];
new sayStore[MAXADS][2][128];
new gmsgSayText;
//Counters
new adCount[2] = {0, 0};
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_cvar("ad_react_all", "1");
gmsgSayText = get_user_msgid("SayText");
register_clcmd("say","eventSay");
register_clcmd("say_team","eventSay");
//Delay the load proces by 10 sec because we don't want to get more load
//on the already high-load mapchange.
//Too soon to affect players while playing, too late to create time-out @ mapchange
set_task(10.0, "load");
}
public load()
{
//Load the data
new filepath[64];
get_configsdir(filepath, 63);
format(filepath, 63, "%s/advertisements.ini", filepath);
if(file_exists(filepath))
{
new output[512], conditions[128], temp[64], type;
//Open file
new fHandle = fopen(filepath, "rt");
//Checks for failure
if(!fHandle)
return;
//Loop through all lines
for(new a = 0; a < MAXADS && !feof(fHandle); a++)
{
//Get line
fgets(fHandle, output, 511);
//Work away comments
if(output[0] == ';' || !output[0] || output[0] == ' ' || output[0] == 10)
{
//Line is not counted
a--;
continue;
}
//Reset type
type = 0;
//Check if it contains conditions
if(output[0] == COND_TKN)
{
//Cut the conditions off the string
split(output, conditions, 127, output, 511, DEVIDE_STKN);
//Determine if its say check or normal ad
type = output[0] == SAY_TKN ? 1 : 0;
//Put the conditions in own space
for(new b = 0; b < 3; b++)
{
new sort[16], cond[32], numb;
//Remove the % from line
conditions[0] = ' ';
trim(conditions);
//Get one condition from the line
split(conditions, temp, 64, conditions, 127, COND_STKN);
split(temp, sort, 15, cond, 31, " ");
if(equali(sort, "map"))
{
numb = 0;
} else if(equali(sort, "min_players"))
{
numb = 1;
} else if(equali(sort, "max_players"))
{
numb = 2;
} else
{
continue;
}
//Copy it to its final resting place <img src='http://img.amxx.pl/public/style_emoticons/<#EMO_DIR#>/naughty.gif' class='bbc_emoticon' alt='^^' />
setString(COND, type, cond, adCount[type], numb);
//Exit if it hasn't got more conditions
if(!conditions[0])
break;
}
to jest część *.sma cale nie weszło jak będzie trzeba dodać mówcie
Użytkownik cesik edytował ten post 18.03.2011 19:16


Dodatki SourceMod



Temat jest zamknięty









