SA-MP Forums Archive
Char control - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Char control (/showthread.php?tid=103123)



Char control - SoeH - 18.10.2009

Can it works?

Код:
#define MAX_NICK_ALLOWED_CHARS 71

new CaratteriNick[MAX_NICK_ALLOWED_CHARS][2] =
{
"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z", //26
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z", //26
"1","2","3","4","5","6","7","8","9","0", // 10
"[","]","_", //3
"(",")","=","@","$","."//6 new
};


IsValidName(nick[])
{
	new character[256];

	for(new i=0; i<(strlen(nick)); i++)
	{
		strmid(character, nick, i, i+1, 2);
		for(new j = 0;j<MAX_NICK_ALLOWED_CHARS; j++)
		{
	  	tmps1 = CaratteriNick[j];
	    if(!strcmp(hash(character), hash(tmps1), false))  return 0;
	  }
	}
	return 1;
}



Re: Char control - Julian2574 - 18.10.2009

Just make a copy of you'r GM and try .