Descriere: cand banezi un jucator mai intai ii apare un motd cu niste informati:
* Data/Ora : la care a primit ban
* Motv : de ce a primit ban
* Timp : pentru cat timp a primit ban
* Admin : numele adminului care la banat
* Informati cu site-ul unde sa posteze pentru Unban
Descarcare:
v1.1: Link! -
http://fisierulmeu.ro/32IAVZ38MGS7/new-style-ban-rar.htmlnew! v1.2: Link! - yousendit.com /transfer.php?action=batch_download&batch_id=dVlyK0dzR3NwM21Ga1E9PQ
| Afiseaza codul
Cod:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "NewStyleBan"
#define VERSION "1.2"
#define AUTHOR "P.Of.Pw"
#define ADMIN_ACCESS ADMIN_BAN
new player_ss,logs,ban_show_chat
new minutes[8], reason[64]
new const site[]= "
www.siteul_tau.com"new const msg_motd []= "Ai primit ban!"
new const gwait[] = "wait;wait;wait"
new const command[]= "amx_bann"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_dictionary("admincmd.txt")
register_dictionary("common.txt")
register_concmd(command,"cmdNewBAN",ADMIN_ACCESS,"<target> Dai ban")
player_ss = register_cvar("ban_ss","1")
logs = register_cvar("ban_logs","1")
ban_show_chat = register_cvar("ban_chat_show","1")
}
public cmdNewBAN(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new target[32]
read_argv(1, target, 31)
read_argv(2, minutes, 7)
read_argv(3, reason, 63)
new player = cmd_target(id, target, 9)
if (!player)
return PLUGIN_HANDLED
new authid[32],admin_name[32], name2[32], authid2[32], name[32]
new userid2 = get_user_userid(player)
new motd[1501],len
new sztime[54], Ip[32], hostname[64], szdata[54]
get_user_authid(player, authid2, 31)
get_user_authid(id, authid, 31)
get_user_name(id, admin_name, 31)
get_user_name(player, name2, 31)
get_user_name(id, name, 31)
get_time("%m.%d.%Y",szdata, 53)
get_time("%H:%M:%S",sztime, 53)
get_user_ip(player, Ip, 31, 1)
get_cvar_string("hostname",hostname, 63)
log_amx("Ban: ^"%s<%d><%s><>^" ban and kick ^"%s<%d><%s><>^" (minutes ^"%s^") (reason ^"%s^")", name, get_user_userid(id), authid, name2, userid2, authid2, minutes, reason)
new temp[64], banned[16], nNum = str_to_num(minutes)
if (nNum)
format(temp, 63, "%L", player, "FOR_MIN", minutes)
else
format(temp, 63, "%L", player, "PERM")
format(banned, 15, "%L", player, "BANNED")
/********************************************************************************/
if(get_pcvar_num(player_ss) == 1 )
{
set_hudmessage(0, 255, 0, 0.39, 0.29, 0, 6.0, 10.0)
show_hudmessage(id,"[ New Style Ban ] IP-ul tau: %s",Ip)
client_print(player,print_chat,"** Sa executat comanda ^"%s^" asaupra ta!",command)
client_print(player,print_chat,"** Numele tau: %s, IP-ul tau: %s, Banat de: %s, POSTEZI POZELE PE: %s",name2,Ip,admin_name,site)
client_cmd(player,"spk ^"vox/bizwarn.screen.screen.screen^"")
client_cmd(player,"snapshot;%s;snapshot;%s;snapshot",gwait, gwait)
}
/********************************************************************************/
if(get_pcvar_num(ban_show_chat) == 1 )
{
client_print(0,print_chat,"***ADMIN:%s la banat pe:%s Minute:^"%s^" Motiv:^"%s^"",admin_name,name2,minutes,reason)
}
/********************************************************************************/
if(get_pcvar_num(logs) == 1 )
{
new szFile[128]
get_configsdir(szFile,127)
formatex(szFile,127,"%s/ban_logs.txt",szFile)
if(!file_exists(szFile))
{
write_file(szFile,"Log'S Ban:",-1)
write_file(szFile,"(c) PoSiTiOn Of PoWeR",-1)
write_file(szFile," ",-1)
}
new szLog[256]
formatex(szLog,255,"Admin: %s , la banat pe %s , in Data %s - Ora %s , Motiv: %s , Minute: %s ",admin_name,name2,szdata,sztime,reason,minutes)
write_file(szFile,szLog,-1)
write_file(szFile," ",-1)
}
/********************************************************************************/
len = format(motd, 1500,"<body bgcolor=#000000><font color=#87cefa><pre>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"blue^">%s</font></h4></center>",hostname)
len += format(motd[len], 1500-len,"<left><font color=^"red^"><B>DATA: %s - Ora: %s</B></color></left>^n",szdata,sztime)
len += format(motd[len], 1500-len,"<left><font color=^"red^"><B>Motiv: %s</B></color></left>^n",reason)
len += format(motd[len], 1500-len,"<left><font color=^"red^"><B>Ip: %s</B></color></left>^n",Ip)
len += format(motd[len], 1500-len,"<left><font color=^"red^"><B>Timp: %s minute</B></color></left>^n",minutes)
len += format(motd[len], 1500-len,"<left><font color=^"red^"><B>Admin: %s </B></color></left>^n",admin_name)
len += format(motd[len], 1500-len,"<left><font color=^"blue^">*pentru unban: postezi pozele pe %s</color></left>^n^n",site)
show_motd(player,motd,msg_motd)
/********************************************************************************/
if (reason[0])
set_task(9.0,"cmdban_reason",player)
else
set_task(10.0,"cmdban_no_reason",player)
/********************************************************************************/
new activity = get_cvar_num("amx_show_activity")
if (activity != 0)
{
new players[32], pnum, msg[256], len
get_players(players, pnum, "c")
for (new i = 0; i < pnum; i++)
{
len = format(msg, 255, "%L", players[i], "ADMIN")
if (activity == 1)
len += copy(msg[len], 255-len, ":")
else
len += format(msg[len], 255-len, " %s:", name)
len += format(msg[len], 255-len, " %L", players[i], "BAN")
len += format(msg[len], 255-len, " %s ", name2)
if (nNum)
format(msg[len], 255-len, "%L", players[i], "FOR_MIN", minutes)
else
format(msg[len], 255-len, "%L", players[i], "PERM")
client_print(players[i], print_chat, "%s", msg)
}
}
console_print(id,"[ New Style Ban ] NUME: %s - IP: %s",name2,Ip)
console_print(id,"[ New Style Ban ] NUME: %s - IP: %s",name2,Ip)
console_print(id,"[ New Style Ban ] NUME: %s - IP: %s",name2,Ip)
console_print(id,"[ New Style Ban ] NUME: %s - IP: %s",name2,Ip)
console_print(id,"[ New Style Ban ] NUME: %s - IP: %s",name2,Ip)
console_print(id,"[AMXX] %L", id, "CLIENT_BANNED", name2)
return PLUGIN_HANDLED
}
public cmdban_reason(player)
{
new authid2[32],userid2
userid2 = get_user_userid(player)
get_user_authid(player, authid2, 31)
new address[32],g_Reason[32]
get_user_ip(player, address, 31, 1)
new temp[64], banned[16], nNum
nNum = str_to_num(minutes)
copy(g_Reason, 31, reason)
if (nNum)
format(temp, 63, "%L", player, "FOR_MIN", minutes)
else
format(temp, 63, "%L", player, "PERM")
format(banned, 15, "%L", player, "BANNED")
server_cmd("kick #%d ^"%s (%s %s)^";wait;addip ^"%s^" ^"%s^";wait;writeip", userid2, g_Reason, banned, temp, minutes, address)
}
public cmdban_no_reason(player)
{
new authid2[32], userid2, temp[64], banned[16], nNum
userid2 = get_user_userid(player)
get_user_authid(player, authid2, 31)
new address[32]
get_user_ip(player, address, 31, 1)
nNum = str_to_num(minutes)
if (nNum)
format(temp, 63, "%L", player, "FOR_MIN", minutes)
else
format(temp, 63, "%L", player, "PERM")
format(banned, 15, "%L", player, "BANNED")
server_cmd("kick #%d ^"%s %s^";wait;addip ^"%s^" ^"%s^";wait;writeip", userid2, banned, temp, minutes, address)
}
Nume:New Style Ban
Idee data de: dwrEEE /
Versiune: 1.1
v1.1- fixare mici erori.
v1.2- imbunatatire plugin
Autor: AlinHD aka PoSiTiOn Of PoWeR
Multumuri:
<LiTTle_B@NK$> pentru teste.
anakin_cstrike - pentru sugestile date, etc
)
Instalare:
1. Fisierul new_style_ban.sma il puneti in addons/amxmodx/scripting
2. Fisierul new_style_ban.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Cod:
new_style_ban.amxx
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
ban_ss 0/1 - face poze + mesaje in chat / hud = Implicit 1
ban_logs 0/1 - creaza un fisier "ban_logs.txt" in amxmodx/configs cu toate ban-urile date, etc.
= Implicit 1
ban_chat_show 0/1 - arata un mesaj in chat la toti jucatori ce Admin ia dat ban lui X, minute, motiv, etc.. = Implicit 1
Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
amx_bann - "nume" "minute" "motiv" dai ban intr-un nou mod
Altele:
modificati:
Citat:
static const site[]= "
www.siteul_tau.com"cu adresa site-ului vostru.
Citat:
new const msg_motd []= "Ai primit ban!"
Reprezinta mesajul care apare in coltul la 'MOTD'
Citat:
new const command[]= "amx_bann"
Reprezinta comanda care o folosesti la banare
Imagini:
https://i305.photobucket.com/albums/nn21 ... tled-7.jpg
new!
https://i305.photobucket.com/albums/nn21 ... reason.png
new!
https://i305.photobucket.com/albums/nn21 ... shower.png
new!
https://i305.photobucket.com/albums/nn21 ... n_logs.png
GL & HF !