[Help] MySQL - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] MySQL (
/showthread.php?tid=157977)
[Help] MySQL -
Kastranova - 08.07.2010
i'm busy trying to make a roleplay server with mysql. however im stuck.
Can somebody give me the code to get a value out of the database and than set it to the players money ammount
Please help me
i already have this but the results are not good
Код:
new string1[256];
new result1;
format(string1,sizeof(string1),"SELECT `cash` FROM `users` WHERE `username` = '%s' AND `password` = '%s'",playername2, passnow);
result1 = mysql_query(string1);
new stores;
stores = mysql_store_result(result1);
new cash;
new Field[64];
ammount = mysql_fetch_row_format(Field, "|", stores);
cash = mysql_free_result();
format(string, sizeof(string), "Cash Loaded, you have $ %s", cash);
Re: [Help] MySQL -
Kastranova - 08.07.2010
I realy need the help please