11.06.2014, 17:59
A string is nothing more than an array filled with ASCII-character codes for each letter. Instead of using strfind for every number, you can do something like this:
Note that '0' and '9' are NOT numbers, but ASCII characters. What happens here is that the script checks if the ASCII code of name[c] (a character in your name) is between the ASCII number of '0' (which is 48 ) and the ASCII number of '9' (which is 57). So if any of the name's characters is between those ASCII characters in the list, it will kick the player. The full ASCII list can be found here.
Код:
for (new c; c < sizeof(name); c++) { if ('0' <= name[c] <= '9') return Kick(playerid); }