Playername == PlAyErNaMe - 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: Playername == PlAyErNaMe (
/showthread.php?tid=256312)
Playername == PlAyErNaMe -
Blokkmonsta - 20.05.2011
hi,
I have scripted a registration system but i have a problem.
User can register the same names x-times.
They only have to change the case sensitive.
pawn Код:
new file[64], string[128];
GetPlayerName(playerid, pInfo[playerid][AccName], MAX_PLAYER_NAME);
format(file, sizeof(file), "/nxadmin/Accounts/%s.ini", pInfo[playerid][AccName]);
if (!dini_Exists(file))
{
print("Account exists");
}
has somebody a idea what i can do?
Re: Playername == PlAyErNaMe -
ddnbb - 20.05.2011
pawn Код:
if(!dini_Exists(file))
{
//Register
}
else
{
//Login
}
Re: Playername == PlAyErNaMe -
steki. - 20.05.2011
Pawn(C++) and SA-MP both are case sensitive, use a !strcmp
AW: Re: Playername == PlAyErNaMe -
Blokkmonsta - 20.05.2011
Quote:
Originally Posted by Luнs Miki
Pawn(C++) and SA-MP both are case sensitive, use a !strcmp
|
and how i should use strcmp in conjunction with dini?
Re: Playername == PlAyErNaMe -
ddnbb - 20.05.2011
pawn Код:
new file[64], string[128];
GetPlayerName(playerid, pInfo[playerid][AccName], MAX_PLAYER_NAME);
format(file, sizeof(file), "/nxadmin/Accounts/%s.ini", pInfo[playerid][AccName]);
if (dini_Exists(file))
{
print("Account exists");
}
Isnt that hard...
AW: Re: Playername == PlAyErNaMe -
Blokkmonsta - 20.05.2011
Quote:
Originally Posted by ddnbb
pawn Код:
new file[64], string[128]; GetPlayerName(playerid, pInfo[playerid][AccName], MAX_PLAYER_NAME); format(file, sizeof(file), "/nxadmin/Accounts/%s.ini", pInfo[playerid][AccName]); if (dini_Exists(file)) { print("Account exists"); }
Isnt that hard...
|
You donґt understand what i mean.
Re: Playername == PlAyErNaMe -
KoczkaHUN - 20.05.2011
turn the characters of the filename lowercase, then save and check them.