User
Pass
2FA
 
 

problema la name_management
Go to page 1, 2  Next    
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources
Author Message2569
Tyger

[Born Wild]



Status: Offline
(since 17-05-2014 22:04)
Joined: 15 Jun 2009
Posts: 440, Topics: 30
Location: Romania

Reputation: 300.4
Votes: 10

Post Posted: 02-08-2009, 19:15:43 | Translate post to: ... (Click for more languages)

Rog si eu pe cineva cu experienta sa ma lumineze, am luat pluginul name_management, pt nu da voie sa intre in serv pe cei cu nick mai mic de 3 caractere si pb e ca indiferent cate caractere are nickul da kick si zice ca nickul e prea scurt, de unde poate fi problema? App, folosesc amxmodx 1.8.1.
Multumesc anticipat!!!!


Edited: Fara reclama in semnatura
0 0
  
Back to top
View user's profile Send private message
N3o

[Mentally Stable]



Status: Offline
(since 29-03-2013 11:19)
Joined: 14 Jul 2009
Posts: 52, Topics: 14
Location: Freakz

Reputation: 125.8
Votes: 5

Post Posted: 03-08-2009, 10:23:30 | Translate post to: ... (Click for more languages)

Pai nu pui doar Pluginul in plugins si "name_management.amxx" in plugins.ini >> Setezi din amxx.cfg adica din cate stiu eu se adauga si acolo numele pluginului si setarile care le vrei -
0 0
  
Back to top
View user's profile Send private message
Tyger

[Born Wild]



Status: Offline
(since 17-05-2014 22:04)
Joined: 15 Jun 2009
Posts: 440, Topics: 30
Location: Romania

Reputation: 300.4
Votes: 10

Post Posted: 03-08-2009, 11:44:03 | Translate post to: ... (Click for more languages)

am cautat peste tot....da nu zice nicaieri de asa ceva...da o sa fac si asta

Edited: Fara reclama in semnatura
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 03-08-2009, 12:33:14 | Translate post to: ... (Click for more languages)

Nu se pune si in amxx.cfg, pune .sma-ul aici sa vedem despre ce e vorba.
0 0
  
Back to top
View user's profile Send private message
Tyger

[Born Wild]



Status: Offline
(since 17-05-2014 22:04)
Joined: 15 Jun 2009
Posts: 440, Topics: 30
Location: Romania

Reputation: 300.4
Votes: 10

Post Posted: 03-08-2009, 13:21:50 | Translate post to: ... (Click for more languages)

uite aici:

#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", "18");
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[i] == 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;
}


Edited: Fara reclama in semnatura
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 03-08-2009, 13:40:13 | Translate post to: ... (Click for more languages)

Ar trebui sa mearga bine, pune asta in amxx.cfg
Code:
amx_name_symbols "!@#$%^"&*~`"
amx_name_minlength "3"
amx_name_maxlength "18"
amx_name_restrict "0"

0 0
  
Back to top
View user's profile Send private message
Tyger

[Born Wild]



Status: Offline
(since 17-05-2014 22:04)
Joined: 15 Jun 2009
Posts: 440, Topics: 30
Location: Romania

Reputation: 300.4
Votes: 10

Post Posted: 03-08-2009, 13:48:32 | Translate post to: ... (Click for more languages)

tot la fel imi da si am nume mai lung de 3 caractere - ........... Reason: Kicked :"You'r name is too short!"

Edited: Fara reclama in semnatura
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 03-08-2009, 14:23:37 | Translate post to: ... (Click for more languages)

Pune-ti numele mai mare de 18 caractere sa vedem ce eroare da.
0 0
  
Back to top
View user's profile Send private message
Tyger

[Born Wild]



Status: Offline
(since 17-05-2014 22:04)
Joined: 15 Jun 2009
Posts: 440, Topics: 30
Location: Romania

Reputation: 300.4
Votes: 10

Post Posted: 03-08-2009, 15:05:13 | Translate post to: ... (Click for more languages)

tot la fel adik ca e prea scurt imi zice ....... - am anulat toate pluginurile nu am lasat decat alea de admin si el si tot la fel face

Edited: Fara reclama in semnatura
0 0
  
Back to top
View user's profile Send private message
Tyger

[Born Wild]



Status: Offline
(since 17-05-2014 22:04)
Joined: 15 Jun 2009
Posts: 440, Topics: 30
Location: Romania

Reputation: 300.4
Votes: 10

Post Posted: 03-08-2009, 21:22:14 | Translate post to: ... (Click for more languages)

nimeni nu stie de la ce ar putea face asa ceva?

Edited: Fara reclama in semnatura
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 03-08-2009, 22:15:54 | Translate post to: ... (Click for more languages)

Pune-ti numele de 40 caractere.
0 0
  
Back to top
View user's profile Send private message
Tyger

[Born Wild]



Status: Offline
(since 17-05-2014 22:04)
Joined: 15 Jun 2009
Posts: 440, Topics: 30
Location: Romania

Reputation: 300.4
Votes: 10

Post Posted: 04-08-2009, 11:00:27 | Translate post to: ... (Click for more languages)

unde ai mai vaz tu nick de 40 de caractere?....

Edited: Fara reclama in semnatura
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 04-08-2009, 11:22:18 | Translate post to: ... (Click for more languages)

Doar pune, se micsoreaza automat la dimensiunea maxima, eu vreau sa vad mesajul de eroare...
0 0
  
Back to top
View user's profile Send private message
Tyger

[Born Wild]



Status: Offline
(since 17-05-2014 22:04)
Joined: 15 Jun 2009
Posts: 440, Topics: 30
Location: Romania

Reputation: 300.4
Votes: 10

Post Posted: 04-08-2009, 12:11:15 | Translate post to: ... (Click for more languages)

am pus si tot la fel zice..... ca e prea mic...... undeva nu recunoaste un parametru...... as vrea sa vad la alt serv daca merge, ca nu mai stiu ce ar putea avea, ca de la alte pluginuri nu e, am incercat si pe amxmodx 1.76d si tot la fel, nu mai stiu ce sa mai schimb, am anulat cvar-ul cu nick mai mic de 3 caractere si mi-am bagat multe cum ai zis tu si nu a detectat ca am nick mai mare si m-a lasat sa intru.

Edited: Fara reclama in semnatura
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 04-08-2009, 12:19:51 | Translate post to: ... (Click for more languages)

Dupa ce ai anulat cvar-ul pentru minime te-a lasat sa intri?
0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources  
Go to page 1, 2  Next    


The time now is 29-07-2025, 23:36:53
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password