Categoria cu cereri de pluginuri si nu numai.
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
-
burn09
- Membru, skill +2
- Posts: 549
- Joined: 16 Dec 2008, 23:02
- Detinator Steam: Da
- CS Status: CSDM Project
- Detinator server CS: Inchis din 2011.
- SteamID: burnnn669
- Location: Bucuresti
- Has thanked: 27 times
- Been thanked: 47 times
08 Oct 2009, 14:57
salut. as vrea si eu pluginul acela care schimba numele jucatorilor cu caractere de genul !@#$% etc.
de ex: ##$%Player]!@ -> Player
parca facuse annakin unul dar nu-l gasesc am dat search si am gasit decat restrict name advanced si nu e bun ca ii da afara...
-
Ciprian
- Fost administrator
- Posts: 5172
- Joined: 10 May 2008, 21:29
- Detinator Steam: Da
- CS Status: ^^
- SteamID: crazycipry
- Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
- Location: Baia Mare
- Has thanked: 177 times
- Been thanked: 405 times
-
compaq
- Fost moderator
- Posts: 2598
- Joined: 01 Dec 2008, 15:32
- Detinator Steam: Da
- Reputatie: Fost eXtream Mod
Fost contribuitor
Fost manager
Fost Scripter eXtreamCS
- Has thanked: 15 times
- Been thanked: 152 times
08 Oct 2009, 15:22
Corect:
- name management | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Name Management"
#define VERSION "1.0"
#define AUTHOR "Alka"
enum CVARS {
CVAR_SYMBOLS = 0,
CVAR_MINLENGTH,
CVAR_MAXLENGTH,
CVAR_RESTRICTNAME
}
new gPcvar[CVARS];
new gFile[64];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_dictionary("name_management.txt");
gPcvar[CVAR_SYMBOLS] = register_cvar("amx_name_symbols", "!@#$%"&*~`:;'"[{]},<.>/?\|()-_=+");
gPcvar[CVAR_MINLENGTH] = register_cvar("amx_name_minlength", "3");
gPcvar[CVAR_MAXLENGTH] = register_cvar("amx_name_maxlength", "17");
gPcvar[CVAR_RESTRICTNAME] = register_cvar("amx_name_restrict", "1");
}
public plugin_cfg()
{
new sConfigsDir[64];
get_configsdir(sConfigsDir, sizeof sConfigsDir - 1);
formatex(gFile, sizeof gFile - 1, "%s/restricted_names.ini", sConfigsDir);
if(!file_exists(gFile))
{
write_file(gFile, "", -1);
server_print("%L", LANG_SERVER, "FILE_CREATED");
}
}
public client_connect(id)
{
static sName[32];
get_user_name(id, sName, sizeof sName - 1);
if(gPcvar[CVAR_SYMBOLS])
{
static sChars[32];
get_pcvar_string(gPcvar[CVAR_SYMBOLS], sChars, sizeof sChars - 1);
for(new i = 0 ; i < strlen(sName) ; i++)
{
for(new j = 0 ; j < strlen(sChars) ; j++)
{
if(sName == sChars[j])
{
server_cmd("kick #%d ^"%L^"", get_user_userid(id), LANG_PLAYER, "INVALID_CHAR");
break;
}
}
}
}
if(gPcvar[CVAR_MINLENGTH] || gPcvar[CVAR_MAXLENGTH])
{
new iLen;
while(!equal(sName[iLen], "^0"))
iLen++;
if(iLen < gPcvar[CVAR_MINLENGTH])
server_cmd("kick #%i ^"%L^"", get_user_userid(id), LANG_PLAYER, "SHORT_NAME");
else if(iLen > gPcvar[CVAR_MAXLENGTH])
server_cmd("kick #%i ^"%L^"", get_user_userid(id), LANG_PLAYER, "LONG_NAME");
}
if(gPcvar[CVAR_RESTRICTNAME])
{
if(is_string_in_file(sName))
server_cmd("kick #%i ^"%L^"", get_user_userid(id), LANG_PLAYER, "NAME_RESTRICTED");
}
}
stock bool:is_string_in_file(const String[])
{
new iFile = fopen(gFile, "rt");
if(!iFile)
return false;
static sBuffer[32];
while(!feof(iFile))
{
fgets(iFile, sBuffer, sizeof sBuffer - 1);
if(!sBuffer[0] || sBuffer[0] == ';')
continue;
if(equali(sBuffer, String, strlen(String)))
return true;
}
fclose(iFile);
return false;
}
Lang-ul il faci tu.
-
PoSiTiOn Of PoWeR
- Utilizator banat
- Posts: 2467
- Joined: 28 Oct 2007, 12:18
- Detinator Steam: Nu
- Reputatie: Fost super moderator (suspendare 2 luni)
Fost scripter eXtreamCS
Nick anterior : AlinHD
1.6 / 3
- Has thanked: 4 times
- Been thanked: 116 times
08 Oct 2009, 16:30
->
- | Afiseaza codul
#include <amxmodx>
new const chars[][] =
{
"@",
"$",
"&",
"*",
"#",
"!",
"%",
"|",
"[",
"]"
}
public plugin_init()
{
register_plugin("No Chars in Name", "0.1", "P.Of.Pw")
}
public client_putinserver(id)
{
set_task(2.0, "check_chars", id)
}
public check_chars(id)
{
if (is_user_bot(id))
return PLUGIN_CONTINUE
new name[32], ilen[64]
get_user_name(id, name, 31)
for (new i = 0; i < sizeof chars; i++)
while (containi(name, chars) != -1) replace_all(name, 31, chars, "")
formatex(ilen, 63, "%s", name)
client_cmd(id, "name ^"%s^"", ilen)
return PLUGIN_CONTINUE
}
public client_infochanged(id)
{
new newname[32], oldname[32], ilen[64]
get_user_info(id, "name", newname, 31)
get_user_name(id, oldname, 31)
if (equali(newname, oldname))
return PLUGIN_CONTINUE
for (new i = 0; i < sizeof chars; i++)
while (containi(newname, chars) != -1) replace_all(newname, 31, chars, "")
formatex(ilen, 63, "%s", newname)
client_cmd(id, "name ^"%s^"", ilen)
return PLUGIN_CONTINUE
}
Last edited by
PoSiTiOn Of PoWeR on 09 Oct 2009, 20:43, edited 1 time in total.
Reason: edit2
-
burn09
- Membru, skill +2
- Posts: 549
- Joined: 16 Dec 2008, 23:02
- Detinator Steam: Da
- CS Status: CSDM Project
- Detinator server CS: Inchis din 2011.
- SteamID: burnnn669
- Location: Bucuresti
- Has thanked: 27 times
- Been thanked: 47 times
08 Oct 2009, 17:10
AlinHD wrote:->
- | Afiseaza codul
/* No Chars in Name - v0.1
*
* by PoSiTiOn Of PoWeR
* 08.10.2009
*
* This file is provided as is (no warranties).
*
*/
#include <amxmodx>
#if !defined charsmax
#define charsmax(%1) sizeof(%1)-1
#endif
new const chars[][] =
{
"@",
"$",
"&",
"*",
"#",
"!",
"%",
"|",
"[",
"]",
"/",
"\"
}
public plugin_init()
{
register_plugin("No Chars in Name", "0.1", "P.Of.Pw")
}
public client_connect(id)
{
set_task(3.0, "check_chars", id)
}
public check_chars(id)
{
if (is_user_bot(id) || !is_user_connected(id))
return
new name[32]
get_user_name(id, name, charsmax(name))
for (new i = 0; i < sizeof chars; i++)
while (contain(name, chars) != -1) replace(name, charsmax(name), chars, "")
client_cmd(id, "name ^"%s^"", name)
}
public client_infochanged(id)
{
new newname[32], oldname[32]
get_user_info(id, "name", newname, charsmax(newname))
get_user_name(id, oldname, charsmax(oldname))
if (equali(newname, oldname))
return
for (new i = 0; i < sizeof chars; i++)
while (contain(newname, chars) != -1) replace(newname, charsmax(newname), chars, "")
client_cmd(id, "name ^"%s^"", newname)
}
un plugin ca asta cautam (care sa NU dea kick)... in fine am testat dar nu schimba numele.. le permite sa joace cu semne.. poti sa-l faci sa mearga , te rog >:D<
-
burn09
- Membru, skill +2
- Posts: 549
- Joined: 16 Dec 2008, 23:02
- Detinator Steam: Da
- CS Status: CSDM Project
- Detinator server CS: Inchis din 2011.
- SteamID: burnnn669
- Location: Bucuresti
- Has thanked: 27 times
- Been thanked: 47 times
09 Oct 2009, 19:26
am amxmodx 1.8.0.3 , n-am nici un plugin care sa utilizeze aceste caractere (ba chiar le-am oprit pe toate sa fiu sigur am lasat admin.amxx si inca 2-3 care erau default) si degeaba
ps: am folosit scriptul din postul in care ai dat edit.
-
burn09
- Membru, skill +2
- Posts: 549
- Joined: 16 Dec 2008, 23:02
- Detinator Steam: Da
- CS Status: CSDM Project
- Detinator server CS: Inchis din 2011.
- SteamID: burnnn669
- Location: Bucuresti
- Has thanked: 27 times
- Been thanked: 47 times
09 Oct 2009, 21:24
merge :X dar ai putea sa faci sa lase spatiu intre cuvinte? :D
ex: %@burn#!@@player -> burn player
#$#burn!player -> burn player
deci oricate semne ar fi intre cuvinte sa lase un spatiu..:D daca poti daca nu, e bun asa :P
-
Ciprian
- Fost administrator
- Posts: 5172
- Joined: 10 May 2008, 21:29
- Detinator Steam: Da
- CS Status: ^^
- SteamID: crazycipry
- Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
- Location: Baia Mare
- Has thanked: 177 times
- Been thanked: 405 times
09 Oct 2009, 21:27
Ia vezi asa:
- | Afiseaza codul
/* No Chars in Name - v0.1
*
* by PoSiTiOn Of PoWeR
* 08.10.2009
*
* This file is provided as is (no warranties).
*
*/
#include <amxmodx>
#if !defined charsmax
#define charsmax(%1) sizeof(%1)-1
#endif
new const chars[][] =
{
"@",
"$",
"&",
"*",
"#",
"!",
"%",
"|",
"[",
"]",
"/",
"\"
}
public plugin_init()
{
register_plugin("No Chars in Name", "0.1", "P.Of.Pw")
}
public client_connect(id)
{
set_task(3.0, "check_chars", id)
}
public check_chars(id)
{
if (is_user_bot(id) || !is_user_connected(id))
return
new name[32]
get_user_name(id, name, charsmax(name))
for (new i = 0; i < sizeof chars; i++)
while (contain(name, chars) != -1) replace(name, charsmax(name), chars, "")
client_cmd(id, "name ^"%s^"", name)
}
public client_infochanged(id)
{
new newname[32], oldname[32]
get_user_info(id, "name", newname, charsmax(newname))
get_user_name(id, oldname, charsmax(oldname))
if (equali(newname, oldname))
return
for (new i = 0; i < sizeof chars; i++)
while (contain(newname, chars) != -1) replace(newname, charsmax(newname), chars, " ")
client_cmd(id, "name ^"%s^"", newname)
}
-
burn09
- Membru, skill +2
- Posts: 549
- Joined: 16 Dec 2008, 23:02
- Detinator Steam: Da
- CS Status: CSDM Project
- Detinator server CS: Inchis din 2011.
- SteamID: burnnn669
- Location: Bucuresti
- Has thanked: 27 times
- Been thanked: 47 times
09 Oct 2009, 21:40
crazy.cipry wrote:Ia vezi asa:
- | Afiseaza codul
/* No Chars in Name - v0.1
*
* by PoSiTiOn Of PoWeR
* 08.10.2009
*
* This file is provided as is (no warranties).
*
*/
#include <amxmodx>
#if !defined charsmax
#define charsmax(%1) sizeof(%1)-1
#endif
new const chars[][] =
{
"@",
"$",
"&",
"*",
"#",
"!",
"%",
"|",
"[",
"]",
"/",
"\"
}
public plugin_init()
{
register_plugin("No Chars in Name", "0.1", "P.Of.Pw")
}
public client_connect(id)
{
set_task(3.0, "check_chars", id)
}
public check_chars(id)
{
if (is_user_bot(id) || !is_user_connected(id))
return
new name[32]
get_user_name(id, name, charsmax(name))
for (new i = 0; i < sizeof chars; i++)
while (contain(name, chars) != -1) replace(name, charsmax(name), chars, "")
client_cmd(id, "name ^"%s^"", name)
}
public client_infochanged(id)
{
new newname[32], oldname[32]
get_user_info(id, "name", newname, charsmax(newname))
get_user_name(id, oldname, charsmax(oldname))
if (equali(newname, oldname))
return
for (new i = 0; i < sizeof chars; i++)
while (contain(newname, chars) != -1) replace(newname, charsmax(newname), chars, " ")
client_cmd(id, "name ^"%s^"", newname)
}
asta nu merge ala al lui Alin (edit2) e bun dar daca se poate vream sa faca ce am precizat mai sus. :">
-
PoSiTiOn Of PoWeR
- Utilizator banat
- Posts: 2467
- Joined: 28 Oct 2007, 12:18
- Detinator Steam: Nu
- Reputatie: Fost super moderator (suspendare 2 luni)
Fost scripter eXtreamCS
Nick anterior : AlinHD
1.6 / 3
- Has thanked: 4 times
- Been thanked: 116 times
10 Oct 2009, 16:44
burn09 wrote:merge :X dar ai putea sa faci sa lase spatiu intre cuvinte? :D
ex: %@burn#!@@player -> burn player
#$#burn!player -> burn player
deci oricate semne ar fi intre cuvinte sa lase un spatiu..:D daca poti daca nu, e bun asa :P
nu se poate asa
de exemplu intra unul cu numele PopescuVasile si nu ai cum sa dedectezi care este numele si prenumele..poate are careva o idee :-?
-
Users browsing this forum: No registered users and 24 guests