Restrict IP in Name Plugin REHLDS |
Здравствуйте, гость Вход | Регистрация
Наши новости:
|
|
Restrict IP in Name Plugin REHLDS |
Infamous2017 |
20.8.2018, 18:58
Сообщение
|
Hello, can anyone create those plugin? When players using IP in Nickname that it change the Nickname auto to another Name?
I used this here |
|
|
|
cs7RG |
20.8.2018, 19:03
Сообщение
|
|
Hey. Here you go.
Cкрытый текст #include <amxmodx> #include <fakemeta> #define BLOCK_NAME_SPAM // Includes blocking of frequent nickname change. #define TIME_WAIT 5.0 //Time between nick's shifts [Does not work if off BLOCK_NAME_SPAM] #define DEFAULT_NAME "[site.Ru] User" // The name to change it to. Change only visually, when the server is old nick. #define TRUE_KEY "site.ru" new const g_sBadKeys[][] = { "skype", "icq", "connect", "guns", ":27", "http:", "https:", "www.", ".net", ".com", ".ua", ".ru", ".info", ".org", ".tv", ".su", ".biz", ".eu", ".uc", ".ee", ".name", ".ucoz", ".net", ".de", ".uk", ".lv", ".at", ".3dn", ".my", ".su", ".do", ".am", ".es", ".hu", ".ae", ".po", ".pl", ".lt", ".ro" } #define FM_ChangeName(%1,%2,%3) engfunc(EngFunc_SetClientKeyValue, %1, %3, "name", %2) #define GetBit(%1,%2) (%1 & (1 << (%2 & 31))) #define SetBit(%1,%2) %1 |= (1 << (%2 & 31)) #define ResetBit(%1,%2) %1 &= ~(1 << (%2 & 31)) new g_bConnected, g_bChecked; public plugin_init() { register_plugin("Block Adverts", "0.1", "ktoto"); register_forward(FM_ClientUserInfoChanged, "FmClientUserInfoChanged"); register_clcmd("say", "HookSay"); register_clcmd("say_team", "HookSay"); } public client_putinserver(id) SetBit(g_bConnected, id); public client_disconnect(id) { ResetBit(g_bConnected, id); ResetBit(g_bChecked, id); } public FmClientUserInfoChanged(pClient, Infobuffer) { if(!GetBit(g_bConnected, pClient)) return FMRES_IGNORED; static sNewName[32], sOldName[32]; get_user_name(pClient, sOldName, charsmax(sOldName)); engfunc(EngFunc_InfoKeyValue, Infobuffer, "name", sNewName, charsmax(sNewName)); if(!GetBit(g_bChecked, pClient) || strcmp(sNewName, sOldName)) { #if defined BLOCK_NAME_SPAM if(GetBit(g_bChecked, pClient)) { if(is_user_alive(pClient)) { static Float:flCurrentTime, Float:flWaitName[33]; if((flCurrentTime = get_gametime()) < flWaitName[pClient]) { flWaitName[pClient] = flCurrentTime + TIME_WAIT; FM_ChangeName(pClient, sOldName, Infobuffer); return FMRES_HANDLED; // Если не блочится мессага в чате, то замените FMRES_HANDLED на FMRES_SUPERCEDE } flWaitName[pClient] = flCurrentTime + TIME_WAIT; } } #endif if(!IsValidString(sNewName)) FM_ChangeName(pClient, DEFAULT_NAME, Infobuffer); else { new bool:bChange; for(new i; sNewName[i] != '^0'; i++) { if(sNewName[i] == '#' || sNewName[i] == '+') { sNewName[i] = ' '; bChange = true; } } if(bChange) FM_ChangeName(pClient, sNewName, Infobuffer); } SetBit(g_bChecked, pClient); } return FMRES_IGNORED; } public HookSay(id) { static sMsg[128]; read_args(sMsg, charsmax(sMsg)); if(!sMsg[0]) return PLUGIN_HANDLED; static iLenLastMsg[33], iLenCurMsg; if(iLenLastMsg[id] == (iLenCurMsg = strlen(sMsg))) return PLUGIN_HANDLED; else iLenLastMsg[id] = iLenCurMsg; return (IsValidString(sMsg)) ? PLUGIN_CONTINUE : PLUGIN_HANDLED; } bool:IsValidString(string[]) { if(containi(string, TRUE_KEY) != -1) return true; for(new i; i < sizeof g_sBadKeys; i++) if(containi(string, g_sBadKeys[i]) != -1) return false; return true; } Помог ? Нажми спасибку »
|
|
|
Infamous2017 |
20.8.2018, 20:16
Сообщение
|
new const g_sBadKeys[][] =
".ro", "89.34.2.17" Example i add this IP there and added it to server.. Nothing happens. Still the IP 89... is still there :/ |
|
|
|
cs7RG |
20.8.2018, 20:20
Сообщение
|
|
The bot sits in the spectra ?
this plugin changes the nickname of the players who have advertising in the nickname. provide meta list , version.
Отредактировал: cs7RG, - 20.8.2018, 20:21
Помог ? Нажми спасибку »
|
|
|
Infamous2017 |
20.8.2018, 20:31
Сообщение
|
No they are not in SPEC. ...
ReHLDS version: 3.4.0.663-dev Metamod-r v1.3.0.127, API (5:13) Metamod-r build: 10:49:17 Jun 15 2018
Отредактировал: Infamous2017, - 20.8.2018, 20:32
|
|
|
|
cs7RG |
20.8.2018, 20:35
Сообщение
|
|
write me in VK or telegram
Помог ? Нажми спасибку »
|
|
|
Infamous2017 |
20.8.2018, 20:37
Сообщение
|
Umm i dont have VK or telegram.... Only Skype or ICQ ???
|
|
|
|
cs7RG |
20.8.2018, 20:41
Сообщение
|
|
yes. skype cs-7rg
Помог ? Нажми спасибку »
|
|
|