MySQL saving everything apart from playerdata
#4

Why the username is 128 long, the max name length in-game is 20
Why is the IP 128 long, the max ipv2 length is 16
Why register and lastlogin are varchars and not int
Why are all the int's so huge.
Why you don't nave a primary key
Why do you save conntime like this? use the return of gettime(), it increases by 1 every 1 second, you can record the time player spent in-game from playerspawn

OnPlayerSpawn
startOfGameplay=gettime();

And then on player disconnect

OnPlayerDisconnect
totalPlaytime+=gettime() - startOfGameplay;

And just add it to the number you already have in the database.
Reply


Messages In This Thread
MySQL saving everything apart from playerdata - by Ducati - 20.02.2018, 20:50
Re: MySQL saving everything apart from playerdata - by X337 - 21.02.2018, 01:30
Re: MySQL saving everything apart from playerdata - by Ducati - 21.02.2018, 02:10
Re: MySQL saving everything apart from playerdata - by Kaperstone - 21.02.2018, 05:43
Re: MySQL saving everything apart from playerdata - by Ducati - 21.02.2018, 12:47
Re: MySQL saving everything apart from playerdata - by Kaperstone - 21.02.2018, 19:22
Re: MySQL saving everything apart from playerdata - by Ducati - 21.02.2018, 23:31

Forum Jump:


Users browsing this thread: 1 Guest(s)