Byłby ktoś tak miły i przerobił mi plugin podany poniżej, tak aby był kompatybilny z amxbans i banował na 5min? Z góry bardzo dziękuję..
#include <amxmod>
#include <amxmisc>
#include <fun>
#define MAX_WORD_NUM 256
new wordfile[] = "addons/amxmodx/configs/wordlist.txt"
new words[MAX_WORD_NUM][32]
new wlen[MAX_WORD_NUM]
new wnum
new kickrs[] = "Zostales Wyrzucony z powodu Braku Kultury"
public handlesay(id,level,cid) {
new msg[192]
new i, b, s
read_args(msg,191)
replace_all(msg, 191, ",", "")
replace_all(msg, 191, ".", "")
replace_all(msg, 191, "[", "")
replace_all(msg, 191, "]", "")
replace_all(msg, 191, "{", "")
replace_all(msg, 191, "}", "")
replace_all(msg, 191, ",", "")
replace_all(msg, 191, "-", "")
replace_all(msg, 191, "_", "")
replace_all(msg, 191, "=", "")
replace_all(msg, 191, "+", "")
replace_all(msg, 191, "*", "")
replace_all(msg, 191, "!", "")
replace_all(msg, 191, "@", "")
replace_all(msg, 191, "#", "")
replace_all(msg, 191, "$", "")
replace_all(msg, 191, "%", "")
replace_all(msg, 191, "&", "")
replace_all(msg, 191, "(", "")
replace_all(msg, 191, ")", "")
for (i=0;i<wnum;++i)
if ((b=containi(msg,words[i]))!=-1) {
s = 1
}
if (!s) return PLUGIN_CONTINUE
new name[32]
get_user_name(id,name,31)
new bantag[32]
get_user_authid( id, bantag, 31 )
if(is_user_connected(id)){
server_cmd("banid 5 #%d", get_user_userid(id))
server_cmd("kick #%d ^"%s^"", get_user_userid(id), kickrs)
}
new BanInfo[256]
new Date[64]
get_time("%m/%d/%y %H:%M:%S", Date, 63)
formatex(BanInfo, 255, "%s :: Gracz: ^"%s^" zbanowany za: ^"%s^" STEAM_ID: %s", Date, name, msg, bantag)
new filepath[64], filename[128]
get_configsdir( filepath, 63 )
format(filepath, 63, "%s/swear", filepath)
formatex(filename, 127, "%s/swear.log", filepath)
write_file(filename, BanInfo, -1)
set_hudmessage(250, 15, 15, 0.65, 0.75, 2, 0.02, 6.0, 0.01, 0.1, 10)
show_hudmessage(0,"* KULTURA PANOWIE *^nGracz: %s^nZbanowany na 5 min za Przeklinanie", name)
return PLUGIN_HANDLED
}
public read_wordfile() {
new line, filename[64]
build_path(filename,63,wordfile)
if (!file_exists(filename)) return 0
while (wnum<MAX_WORD_NUM && read_file(filename,line++,words[wnum],31,wlen[wnum]))
if (words[wnum][0] != ';') wnum++
return wnum
}
public plugin_init() {
register_plugin("auto h*j","0.9.x","dra mod gracz")
register_clcmd("say","handlesay")
register_clcmd("say_team","handlesay")
read_wordfile()
return PLUGIN_CONTINUE
}


Dodatki SourceMod



Temat jest zamknięty








