SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Gamemode Scripts

Reply
 
Thread Tools Display Modes
Old 23/09/2018, 06:54 PM   #21
Logic_
Banned
 
Join Date: Jun 2015
Posts: 1,517
Reputation: 305
Default Re: [MySQL R41-4] Login / Register Base Script

Quote:
Originally Posted by ZigGamerx View Post
Are you going to Complete it by adding more savings like Admin level And VIP or not?
Learn to script and then learn how to use MySQL. Both of them are two different things.

--

+4 reps though.
Logic_ is offline   Reply With Quote
Old 23/09/2018, 07:16 PM   #22
solstice_
Gangsta
 
solstice_'s Avatar
 
Join Date: Feb 2016
Location: basement
Posts: 545
Reputation: 68
Default Re: [MySQL R41-4] Login / Register Base Script

Quote:
Originally Posted by ZigGamerx View Post
Are you going to Complete it by adding more savings like Admin level And VIP or not?
Will see if I get free time, even if I add admin and VIP you'll have to finish them yourself since this is just a login / register system.

Quote:
Originally Posted by Logic_ View Post
Learn to script and then learn how to use MySQL. Both of them are two different things.

--

+4 reps though.
Thank you!
solstice_ is offline   Reply With Quote
Old 27/09/2018, 12:08 PM   #23
severance
Big Clucker
 
Join Date: Apr 2015
Posts: 126
Reputation: 8
Default Re: [MySQL R41-4] Login / Register Base Script

PHP Code:
    mysql_format(Databasequerysizeof(query), "INSERT INTO `users` (`Username`, `Password`, `IP`, `Cash`, `Kills`, `Deaths`) VALUES ('%e', '%e', '%e', 0, 0, 0)"PlayerName[playerid], PlayerInfo[playerid][Password], PlayerIP[playerid]);
    
// Insert player's information into the MySQL database so we can load it later.
    
mysql_tquery(Databasequery"RegisterPlayer""i"playerid); // We'll call this as soon as the player successfully registers. 
You should use pquery instead of tquery. Good job anyway it's the most updated mysql reg system out there
severance is offline   Reply With Quote
Old 27/09/2018, 01:02 PM   #24
sammp
Gangsta
 
sammp's Avatar
 
Join Date: Jan 2014
Posts: 586
Reputation: 49
Default Re: [MySQL R41-4] Login / Register Base Script

For the love of good look up what an ERD is and use it to establish a far better database design. If you're creating an RDB with one table, you're doing it wrong.
__________________
SA-MP must become open-source to maximise longetivity of the project.
sammp is offline   Reply With Quote
Old 27/09/2018, 02:27 PM   #25
solstice_
Gangsta
 
solstice_'s Avatar
 
Join Date: Feb 2016
Location: basement
Posts: 545
Reputation: 68
Default Re: [MySQL R41-4] Login / Register Base Script

Quote:
Originally Posted by severance View Post
PHP Code:
    mysql_format(Databasequerysizeof(query), "INSERT INTO `users` (`Username`, `Password`, `IP`, `Cash`, `Kills`, `Deaths`) VALUES ('%e', '%e', '%e', 0, 0, 0)"PlayerName[playerid], PlayerInfo[playerid][Password], PlayerIP[playerid]);
    
// Insert player's information into the MySQL database so we can load it later.
    
mysql_tquery(Databasequery"RegisterPlayer""i"playerid); // We'll call this as soon as the player successfully registers. 
You should use pquery instead of tquery. Good job anyway it's the most updated mysql reg system out there
Updated, thanks.
solstice_ is offline   Reply With Quote
Old 27/09/2018, 02:34 PM   #26
v1k1nG
Huge Clucker
 
v1k1nG's Avatar
 
Join Date: Feb 2018
Posts: 437
Reputation: 31
Default Re: [MySQL R41-4] Login / Register Base Script

Good job.
Shame for the passwords though.
v1k1nG is offline   Reply With Quote
Old 27/09/2018, 02:48 PM   #27
solstice_
Gangsta
 
solstice_'s Avatar
 
Join Date: Feb 2016
Location: basement
Posts: 545
Reputation: 68
Default Re: [MySQL R41-4] Login / Register Base Script

Quote:
Originally Posted by v1k1nG View Post
Good job.
Shame for the passwords though.
Why lol?
solstice_ is offline   Reply With Quote
Old 27/09/2018, 03:23 PM   #28
Mobtiesgangsa
Big Clucker
 
Join Date: Oct 2016
Posts: 121
Reputation: 16
Default Re: [MySQL R41-4] Login / Register Base Script

pquery - processed query
tquery - threaded query

i assume ?

or its sencless?
Mobtiesgangsa is online now   Reply With Quote
Old 27/09/2018, 11:52 PM   #29
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,636
Reputation: 537
Default Re: [MySQL R41-4] Login / Register Base Script

Quote:
Originally Posted by Mobtiesgangsa View Post
pquery - processed query
tquery - threaded query

i assume ?

or its sencless?
Both are threaded queries.

tquery puts the query into a queue (all queries you put in this queue will be executed in order, in one thread - very important to know actually).
pquery creates a seperate thread for each query, so they will be executed simultanously. Whichever query is faster will return the result first. Meaning they will not be ordered.
NaS is offline   Reply With Quote
Old 28/09/2018, 07:13 PM   #30
ZigGamerx
Huge Clucker
 
ZigGamerx's Avatar
 
Join Date: Jul 2018
Posts: 201
Reputation: 23
Default Re: [MySQL R41-4] Login / Register Base Script

You didnt created "Create Table if not exists" code?
ZigGamerx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] [MySQL/SQLite] Advance Login & Register System (base script) Gammix Gamemode Scripts 98 14/07/2019 11:25 AM
Mysql Login - Register script problems Vaki Scripting Help 2 18/11/2016 03:34 PM
I am getting a mysql register and login script and im getting a error kingcrome Scripting Help 1 28/10/2013 10:27 PM
[FilterScript] [FS] Simple Base Admin Scipt (Only /register + login) Good for Beginner! Oxside Filterscripts 15 07/03/2010 04:56 PM


All times are GMT. The time now is 12:22 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.