[SQL] Login / Register System - 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)
+--- Thread: [SQL] Login / Register System (
/showthread.php?tid=599934)
[SQL] Login / Register System -
eikzdej - 01.02.2016
Hi!
I'm using this Login/Register System:
https://sampforum.blast.hk/showthread.php?tid=574714
How can i make this system like this?
If not registered, the text in msgbox is this:
Username: <My Username> [Not Registered]
If Registered,
Username: <My Username> [Registered]
Thanks!
Re: [SQL] Login / Register System -
eikzdej - 01.02.2016
Bump?
Re: [SQL] Login / Register System -
KillerDVX - 01.02.2016
PHP код:
new string[128];
format(string, sizeof(string), "SELECT `something` FROM `table` WHERE `name` = '%s'", Name);
mysql_query(string);
if(mysql_num_rows() > 0)
{
//your code(account exist)
return 1;
}
else
{
//your code (account doesn't exist)
return 0;
}
Re: [SQL] Login / Register System -
eikzdej - 01.02.2016
where should i put this?
Re: [SQL] Login / Register System -
KillerDVX - 01.02.2016
Under "OnPlayerConnect".
Re: [SQL] Login / Register System -
eikzdej - 01.02.2016
Thank you. +1 Rep
Re: [SQL] Login / Register System -
eikzdej - 01.02.2016
Quote:
Originally Posted by KillerDVX
Under "OnPlayerConnect".
|
How about adding password confirmation if registering? How can i add it?
Re: [SQL] Login / Register System -
Prostilov - 01.02.2016
What exactly do you mean? Checking if the player inputs the same password twice?
Re: [SQL] Login / Register System -
eikzdej - 01.02.2016
Yes, for example, i input my password, then the confirmation dialog box will pop up and ill input again my password,
If the 2nd password is not match in 1st password, the server will reject it and return to 1st password input.
Re: [SQL] Login / Register System -
eikzdej - 01.02.2016
Anyone?