MYSQL Saving - 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: MYSQL Saving (
/showthread.php?tid=334732)
MYSQL Saving -
Jstylezzz - 15.04.2012
Hi SA-MP,
I started creating a MYSQL account system with
ThisTutorial.
My question is, does anybody know how to make a save function?? Because, it looks like this tutorial didn't made a Save part.
I really hope someone knows..
J.J
Re: MYSQL Saving -
doreto - 15.04.2012
example
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new Query[100];
format(Query,sizeof(Query),"UPDATE `playerdata` SET `money` = '%d', `score` = '%d' WHERE `username` = '%s' ",GetPlayerMoney(playerid),GetPlayerScore(playerid),PlayerName(playerid));
mysql_query(Query);
return true;
}
Re: MYSQL Saving -
Jstylezzz - 15.04.2012
Quote:
Originally Posted by doreto
example
pawn Код:
public OnPlayerDisconnect(playerid, reason) { new Query[100]; format(Query,sizeof(Query),"UPDATE `playerdata` SET `money` = '%d', `score` = '%d' WHERE `username` = '%s' ",GetPlayerMoney(playerid),GetPlayerScore(playerid),PlayerName(playerid)); mysql_query(Query); return true; }
|
Thanks for the fast and helpful reply
Re: MYSQL Saving -
doreto - 15.04.2012
Quote:
Originally Posted by Jari_Johnson*
Thanks for the fast and helpful reply 
|
np I'm glad that I help you