Last login - 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: Last login (
/showthread.php?tid=648064)
Last login -
Loinal - 15.01.2018
Hi, i wanted to add Last login to /stats, actually i have added it but when i try to update it every login i get weird number
Code:
PHP код:
new dayx, monthx, yearx, query[280];
getdate(yearx, monthx, dayx);
format(pData[playerid][RLastLogin], 12, "%d/%d/%d", dayx, monthx, yearx);
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `RLastLogin` = %e WHERE `ID` = %d",
pData[playerid][RLastLogin], pData[playerid][ID]);
mysql_tquery(mysql, query);
After update the query:
Код:
Last Login: 0.007433102
Re: Last login -
iLearner - 15.01.2018
PHP код:
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `RLastLogin` = '%e' WHERE `ID` = %d",
pData[playerid][RLastLogin], pData[playerid][ID]);
mysql_tquery(mysql, query);
Re: Last login -
Loinal - 15.01.2018
Quote:
Originally Posted by iLearner
PHP код:
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `RLastLogin` = '%e' WHERE `ID` = %d",
pData[playerid][RLastLogin], pData[playerid][ID]);
mysql_tquery(mysql, query);
|
Thanks i didn't notice that