Zamień pluginy na serverze na te z załącznika
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Pro100WBANiE
Rejestracja: 19.08.2010Aktualnie: Nieaktywny
Poza forum Ostatnio: 08.03.2015 21:06




Statystyki
- Grupa: Użytkownik
- Całość postów: 64
- Odwiedzin: 3 949
- Tytuł: Pomocny
- Wiek: 30 lat
- Urodziny: Grudzień 10, 1994
-
Imię
Dawid
-
Płeć
Mężczyzna
-
Lokalizacja
Nowy Sącz
Narzędzia użytkownika
Znajomi
Pro100WBANiE nie posiada znajomych
#324453 AmxBans banuje ale nie utrzymuje banów
Napisane przez Pro100WBANiE
w 20.11.2011 18:23
Zamień pluginy na serverze na te z załącznika
#323942 ad_manager
Napisane przez Pro100WBANiE
w 19.11.2011 19:53
#include <amxmodx>
#include <amxmisc>
#pragma semicolon 0
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 = 60.0;
//Maximum difference between two different ads (float)
new const Float:RAND_MAX = 80.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("admanager_version", "0.5", FCVAR_SERVER);
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 ^^
setString(COND, type, cond, adCount[type], numb);
//Exit if it hasn't got more conditions
if(!conditions[0])
break;
}
}
if(type == 0)
type = output[0] == SAY_TKN ? 1 : 0;
if(type == SAY_AD)
{
new said[32], answer[128];
//Remove the @ from line
output[0] = ' ';
trim(output);
split(output, said, 31, answer, 127, DEVIDE_STKN);
//Apply color
setColor(answer, 127);
//Save it
setString(STORE, SAY_AD, said, adCount[SAY_AD], 0);
setString(STORE, SAY_AD, answer, adCount[SAY_AD], 1);
} else//if(type == NORM_AD)
{
//Apply color
setColor(output, 511);
//Save it
setString(STORE, NORM_AD, output, adCount[NORM_AD]);
}
//Increment the right counter
adCount[NORM_AD] += type == NORM_AD ? 1 : 0;
adCount[SAY_AD] += type == SAY_AD ? 1 : 0;
}
//Set a first task, if there are any normal ads
if(adCount[NORM_AD] != 0)
set_task(random_float(RAND_MIN, RAND_MAX), "eventTask");
//Close file to prevent lockup
fclose(fHandle);
}
}
new currAd = -1;
public eventTask()
{
//Go past all ads and check conditions
for(new a = 0; a < adCount[NORM_AD]; a++)
{
//Put current ad to the next one
currAd = currAd == adCount[NORM_AD] - 1 ? 0 : currAd + 1;
if(checkConditions(currAd, NORM_AD))
{
//Display the ad
new data[3];
data[0] = currAd;
data[1] = NORM_AD;
data[2] = 0;
displayAd(data);
break;
}
}
//Set a new task
set_task(random_float(RAND_MIN, RAND_MAX), "eventTask");
return PLUGIN_CONTINUE;
}
public eventSay(id)
{
//If nothing is said, don't check
if(adCount[SAY_AD] == 0)
return PLUGIN_CONTINUE;
new talk[64], keyword[16];
read_args(talk, 63) ;
//En nu rennen voor jullie zakgeld klootzjakken!
for(new a = 0; a < adCount[SAY_AD]; a++)
{
//Get the string
getString(STORE, SAY_AD, keyword, 15, a, 0);
if(containi(talk, keyword) != -1)
{
//Check the rest if it fails to conditions
if(!checkConditions(a, SAY_AD))
continue;
new data[3];
data[0] = a;
data[1] = SAY_AD;
data[2] = id;
//Set the task
set_task(0.3, "displayAd", 0, data, 3);
//Don't execute more of them
break;
}
}
return PLUGIN_CONTINUE;
}
public displayAd(params[])
{
//Get the string that is going to be displayed
new message[128];
getString(STORE, params[1], message, 127, params[0], params[1]);
//If its enabled by cvar and id is set, display to person who triggered message only
if(get_cvar_num("ad_react_all") == 0 && params[2] != 0)
{
new name[64];
get_user_name(params[2],name,charsmax(name));
replace_all(message,charsmax(message),"[you]",name)
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, params[2]);
write_byte(params[2]);
write_string(message);
message_end();
} else
{
//Display the message to everyone
new plist[32], playernum, player;
get_players(plist, playernum, "c");
for(new i = 0; i < playernum; i++)
{
player = plist[i];
new temp[128];
copy(temp,charsmax(temp),message);
new name[64];
get_user_name(player,name,charsmax(name));
replace_all(temp,charsmax(temp),"[you]",name)
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, player);
write_byte(player);
write_string(temp);
message_end();
}
}
return PLUGIN_HANDLED;
}
//---------------------------------------------------------------------------
// STOCKS
//---------------------------------------------------------------------------
stock checkConditions(a, type)
{
//Mapname
if((type == NORM_AD && normConditions[a][0][0]) || (type == SAY_AD && sayConditions[a][0][0]))
{
new mapname[32];
get_mapname(mapname, 31);
if(! (type == NORM_AD && equali(mapname, normConditions[a][0]) ) || (type == SAY_AD && equali(mapname, sayConditions[a][0]) ) )
return false;
}
//Min Players
if((type == NORM_AD && normConditions[a][1][0]) || (type == SAY_AD && sayConditions[a][1][0]))
{
new playersnum = get_playersnum();
if( (type == NORM_AD && playersnum < str_to_num(normConditions[a][1]) ) || (type == SAY_AD && playersnum < str_to_num(sayConditions[a][1]) ) )
return false;
}
//Max Players
if((type == NORM_AD && normConditions[a][2][0]) || (type == SAY_AD && sayConditions[a][2][0]))
{
new playersnum = get_playersnum();
if( (type == NORM_AD && playersnum > str_to_num(normConditions[a][2]) ) || (type == SAY_AD && playersnum > str_to_num(sayConditions[a][2]) ) )
return false;
}
//If everything went fine, return true
return true;
}
stock setColor(string[], len)
{
if (contain(string, "!t") != -1 || contain(string, "!g") != -1 || contain(string,"!n") != -1)
{
//Some nice shiny colors ^^
replace_all(string, len, "!t", "^x03");
replace_all(string, len, "!n", "^x01");
replace_all(string, len, "!g", "^x04");
//Work away a stupid bug
format(string, len, "^x01%s", string);
}
}
stock getString(mode, type, string[], len, one, two = 0)
{
//server_print("mode: %d type: %d len: %d one: %d two %d", mode, type, len, one, two);
//Uses the fact that a string is passed by reference
if(mode == COND)
{
if(type == NORM_AD)
{
copy(string, len, normConditions[one][two]);
} else//if(type = SAY_AD)
{
copy(string, len, sayConditions[one][two]);
}
} else//if(mode == STORE)
{
if(type == NORM_AD)
{
copy(string, len, normStore[one]);
} else//if(type == SAY_AD)
{
copy(string, len, sayStore[one][two]);
}
}
}
stock setString(mode, type, string[], one, two = 0)
{
if(mode == COND)
{
if(type == NORM_AD)
{
copy(normConditions[one][two], 31, string);
} else//if(type = SAY_AD)
{
copy(sayConditions[one][two], 31, string);
}
} else//if(mode == STORE)
{
if(type == NORM_AD)
{
copy(normStore[one], 127, string);
} else//if(type == SAY_AD)
{
copy(sayStore[one][two], 127, string);
}
}
}
#322809 [ROZWIĄZANE] Problem z Roundsound
Napisane przez Pro100WBANiE
w 16.11.2011 21:52
Tutaj poukładałem Ci te piosenki : (Plik roundsound.ini:)
; CT Sounds "sound/misc/Cs-Wisnicz1.mp3" "CT" "sound/misc/Cs-Wisnicz2.mp3" "CT" "sound/misc/Cs-Wisnicz3.mp3" "CT" "sound/misc/Cs-Wisnicz4.mp3" "CT" "sound/misc/Cs-Wisnicz5.mp3" "CT" ; T Sounds "sound/misc/TT1.mp3" "T" "sound/misc/TT2.mp3" "T" "sound/misc/TT3.mp3" "T" "sound/misc/TT4.mp3" "T" "sound/misc/TT5.mp3" "T"
#206582 Czemu bany znikają ?
Napisane przez Pro100WBANiE
w 17.01.2011 08:03
#206427 Czemu bany znikają ?
Napisane przez Pro100WBANiE
w 16.01.2011 16:12
#206423 Czemu bany znikają ?
Napisane przez Pro100WBANiE
w 16.01.2011 16:02
#205948 Nie dziala amxbans
Napisane przez Pro100WBANiE
w 14.01.2011 22:09
Wersja AMXBansa: 6.X - http://www.cscenter.pl/baza_poradnikow_hlds_oraz_hlds2/140090-%5Bamx_mod_x%5D_instalacja_amxbans_6_0_0_a.html
Wersja: AMXMODX 1.8.2
Wersja serwera: Steam i NS (v47,v48)
Logi:
L 01/14/2011 - 23:01:30: [MySQL] Invalid info tuple handle: 0
L 01/14/2011 - 23:01:30: [AMXX] Run time error 10 (plugin "amxbans_main.amxx") (native "SQL_ThreadQuery") - debug not enabled!
L 01/14/2011 - 23:01:30: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Plugins.ini :
amxbans_core.amxx
amxbans_main.amxx
; AMX Mod X plugins
; Admin Base - Always one has to be activated
;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)
reasonkicker.amxx
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
mapchooser.amxx ; allows to vote for next map
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
bulletdamage.amxx ;obrazenia
parachute.amxx ;spadochron
godzina.amxx ;godzina
sillyc4.amxx ;c4 kleji
grenade_trail.amxx ;linie za granatami
pokazuj.amxx ;info
ultimate_ss.amxx ;ss'y
join_leave.amxx ;wchodzi/wychodzi
wp_glow.amxx ;swiecace bronie
weaponicon.amxx ;ikona broni
;show_admins_vl.amxx ;admini
c4.amxx ;c4
realnadedrops.amxx ;he nie wybucha
wybor_interpu.amxx ;wybur interpu
Headshot.amxx ;dzwiek hs
deathtype_effects.amxx ;efekty smierci
ColoredSmoke.amxx ;smok kolor
admin_spec_esp.amxx ;wh dla admina
Modules.ini:
;;;
; To enable a module, remove the semi-colon (in front of its name.
; If it's not here, simply add it its name, one per line.
; You don't need to write the _amxx part or the file extension.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SQL Modules usually need to be enabled manually ;;
;; You can have any number on at a time. Use ;;
;; amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mysql
sqlite
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Put third party modules below here. ;;
;; You can just list their names, without the _amxx ;;
;; or file extension. ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; These modules will be auto-detected and loaded ;;
;; as needed. You do not need to enable them here ;;
;; unless you have problems. ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
fun
engine
fakemeta
geoip
sockets
regex
nvault
hamsandwich
sql.cfg :
// SQL configuration file
// File location: $moddir/addons/amxmodx/configs/sql.cfg
// *NOTE* Linux users may encounter problems if they specify "localhost" instead of "127.0.0.1"
// We recommend using your server IP address instead of its name
// *NOTE* amx_sql_type specifies the DEFAULT database type which admin.sma will use.
amx_sql_host "127.0.0.1"
amx_sql_user "ciemnast_ciemna"
amx_sql_pass "haslo"
amx_sql_db "ciemnast_ciemna"
amx_sql_table "admins"
amx_sql_type "mysql"
#189978 Z kąd wziąśc AMXBANS
Napisane przez Pro100WBANiE
w 19.11.2010 21:01
- AMXX.pl: Support AMX Mod X i SourceMod
- → Przeglądanie profilu: Reputacja: Pro100WBANiE
- Regulamin


Dodatki SourceMod



Moja zawartość

