bioteK_ Member
Posts : 3 Points : 5 Reputation : 3 Join date : 2015-02-12
| Subject: #anti numeric name system. Thu Feb 12, 2015 4:13 am | |
| Hey, i seen that your server have some problem when some player connects with a numeric name, so i have got a anti-numeric name system for you. - Code:
-
//OnPlayerConnect(playerid) callback.
new pname[MAX_PLAYER_NAME]; new numericArray[10] = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; GetPlayerName(playerid,pname,sizeof(pname));
for(new i = 0; i < 10; i++) { if(strfind(pname,numericArray[i],true,0) == -1 ) continue; new tmp[128]; format(tmp, sizeof(tmp), " The player %s was been kicked by A-N Name ", pname[playerid]); SendClientMessageToAll(-1,tmp); Kick(playerid); }
I havn't test it. So if you find some error reply at this post. - Code:
-
//This mean that if in the nickname the first character isn't numeric continue the loop without error. if(strfind(pname,numericArray[i],true,0) == -1 ) continue;
- Code:
-
//If the first character is numerick the player will be kicked. new tmp[128]; format(tmp, sizeof(tmp), " The player %s was been kicked by A-N Name ", pname[playerid]); SendClientMessageToAll(-1,tmp); Kick(playerid);
| |
|
Mr.LongBeard Developer
Posts : 223 Points : 256 Reputation : 8 Join date : 2014-09-23 Age : 29 Location : Turkey In-game username : [GPB]Mr.LongBeard
| Subject: Re: #anti numeric name system. Thu Feb 12, 2015 2:51 pm | |
| Ty for the suggestion we will evaluate but you dont have to copy pawn codes here Our developers know how to code So next time just type your suggestion,not the codes..
LS-SW Developers | |
|
bioteK_ Member
Posts : 3 Points : 5 Reputation : 3 Join date : 2015-02-12
| Subject: Re: #anti numeric name system. Thu Feb 12, 2015 4:56 pm | |
| uhm, i just have write this code because i want give a help to this community not for appear better of your developers, but okey, i don't write more codes here. | |
|
bioteK_ Member
Posts : 3 Points : 5 Reputation : 3 Join date : 2015-02-12
| Subject: Re: #anti numeric name system. Thu Feb 12, 2015 5:59 pm | |
| listen im a good web developer too i script in pawn language when i havn't nothing to do, because pawn is a very simple prorgram language for me. I have a web site where i store all my works in pawn language, if you want check you can at this link. I make a good business system if you are interested you can check it. Enjoy (Y) | |
|
Sponsored content
| Subject: Re: #anti numeric name system. | |
| |
|