SA-MP Forums Archive
MySql : saving and loading Data - 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 and loading Data (/showthread.php?tid=549685)



MySql : saving and loading Data - MrViolence101 - 08.12.2014

Ok guys, here is my problem, i want to save the player's data into my mysql table, i have setup the mysql database and everything, now here is my coding for the saving part(OnPlayerDisconnect)

Код:
new query[128]; 
	GetPlayerMoney(playerid, pInfo[playerid][Cash]);
	mysql_format(mysql,query,sizeof(query),"UPDATE `playerdata` SET `Admin`=%d, `VIP`=%d, `Cash`=%d WHERE `Username`=%s",pInfo[playerid][Admin], pInfo[playerid][VIP], pInfo[playerid][Cash], pInfo[playerid][Username]);
	mysql_tquery(mysql, query, "", "");
That is my only problem for now, any help will be appreciated.


Re: MySql : saving and loading Data - Doller - 08.12.2014

You datacodes add in you scripts then download player accounts save cfg then add with your Gm