Witajcie. Mam małe pytanko. Mogł by mi ktos przerobic ten kod zeby zamiast kickowania to banowało na zawsze?
Za pomoc dam ++
Spoiler
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "speedkill"
new Array:g_NotAllowed;
new g_ArraySize;
public plugin_init(){
register_plugin(PLUGIN, VERSION, AUTHOR);
}
public plugin_cfg(){
g_NotAllowed = ArrayCreate(64);
new g_Path[128];
formatex(g_Path[ get_configsdir(g_Path, charsmax(g_Path)) ], charsmax(g_Path), "/NotAllowedNames.ini");
if(file_exists(g_Path)){
new g_Line[64],
g_NotAllowedNames[64],
g_Len;
for(new i = 0; read_file(g_Path, i, g_Line, charsmax(g_Line), g_Len); i++){
if(!g_Len || !g_Line[0] || g_Line[0] == ';'){
continue;
}
parse(g_Line, g_NotAllowedNames, charsmax(g_NotAllowedNames));
ArrayPushString(g_NotAllowed, g_NotAllowedNames);
}
}
else{
set_fail_state("File NotAllowedNames.ini doesn't exist in configs/");
}
g_ArraySize = ArraySize(g_NotAllowed);
}
public client_authorized(id){
CheckPlayerName(id, 0);
}
public client_infochanged(id){
CheckPlayerName(id, 1);
}
public CheckPlayerName(id, g_Value){
new g_UserName[64];
switch(g_Value){
case 0:{
get_user_name(id, g_UserName, charsmax(g_UserName));
}
case 1:{
get_user_info(id, "name", g_UserName, charsmax(g_UserName));
}
}
for(new i = 0; i < g_ArraySize; i++){
new g_Name[64];
ArrayGetString(g_NotAllowed, i, g_Name, charsmax(g_Name));
if(containi(g_UserName, g_Name) >= 0){
server_cmd("kick #%d ^"Niedozwolony nick!^"", get_user_userid(id));
}
}
}
Użytkownik WCM3 edytował ten post 04.07.2015 15:50


Dodatki SourceMod














