Register Problem
#1

Hello, if a player register with the name for example "Dymbesh" all works but another player can register with the name "dymbesh". How to fix that, and what should i post that you can fix it?
Reply
#2

You cant fix it,its a new feature since 0.3z,and it is better with it
Reply
#3

Really?
Reply
#4

Lol, just ignore him. What you can do, is when a player registers, convert their entire name to lowercase letters. I believe there is a function 'StrToLower' bouncing around on SA-MP forums somewhere. Then this way, when a player tries to join as ThresHOLd, the file 'threshold' is loaded. If someone tries to join as thresHOLD, then 'threshold' is still loaded, meaning you cannot have multiple occurrences of a player's name.

Example:
pawn Код:
//When a player registers:
ConvertStringToLowercase(GetName(playerid), filename); //There are 2 made up functions, that you can create appropriately.
new INI:playerfile = INI_Open(filename); //'filename' would be the path of the user file.
//This creates the player's file with all lowercase letters. I used y_ini as a simple example.

//When a player logs in:
ConvertStringToLowercase(GetName(playerid), filetoload);
INI_ParseFile(filetoload, "LoadUser_%s", ...);
//Load user's file, etc.
EDIT: If this really does confuse you, feel free to send me a PM and I can alter your script for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)