Quick help, I'm tired ;) - 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: Quick help, I'm tired ;) (
/showthread.php?tid=239277)
Quick help, I'm tired ;) -
Antonio [G-RP] - 13.03.2011
Alright so..
I'm legit confused as to how I load skins from the DB (i know how to do that) and then put them in to Skins, making the variable inside [ and ] go up by 1 every time. If anybody understands what I mean, any help would be greatly appreciated.
Re: Quick help, I'm tired ;) -
Sascha - 13.03.2011
try something like this:
pawn Код:
new query[100];
format(query, sizeof(query), "mysql code.. (you know it:P)");
mysql_query(query);
mysql_store_result();
new n = mysql_num_rows();
mysql_free_result();
for(new i=0; i<n; i++)
{
format(query, sizeof(query), "SELECT * FROM `Skins` WHERE `id`='%d'", i);
mysql_query(query);
mysql_store_result();
get the id...
Skin[i] = id;
mysql_free_result();
}
hope that helps...