Register Limit
#1

Hello,

I'm trouble. When someone do, for example "/register 90123801938018931908301983901381908301989013890389 0183108309893890381019031893" the server freeze!

I want to know, how to limite character in /register.


Thanks!
Reply
#2

Use something like this:
pawn Код:
if(strlen(pwd) > 20) return SendClientMessage(playerid, 0xFFFFFFAA, "You can't have more than 20 characters in password.");
20 characters is just an example, set your own value.
Reply
#3

Quote:
Originally Posted by Don Correlli
Use something like this:
pawn Код:
if(strlen(pwd) > 20) return SendClientMessage(playerid, 0xFFFFFFAA, "You can't have more than 20 characters in password.");
20 characters is just an example, set your own value.
But.. 'pwd' is not specific before..
And I'm using strcmp.
Reply
#4

'pwd' is just an example.
Reply
#5

On top of your script under include a samp:
pawn Код:
stock strval_fix(string[]) return strlen(string) > 49? 0 : strval(string); //By Amit_B
#define strval strval_fix
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)