25.06.2012, 19:03
Try these
Edit: if that doesn't work, substitute using the sscanf parameters that Pedro_Miranda provided:
Код:
stock loadbusiness() { new businessCount = LoadBusinessInfo(); for(new i=0; i<businessCount; i++) { currbusiness += 1; CreatePickup(1272, 1, BVar[i][bpickupx], BVar[i][bpickupy], BVar[i][bpickupz], 0); } print("Buinesses Loaded"); } stock LoadBusinessInfo() { new Query[700]; mysql_query("SELECT * FROM businessinfo"); new i = 0; while(mysql_fetch_row(Query)) { sscanf(Query, "e<p<|>dfffs[28]s[24]dddddfff>", BVar[i][bid], BVar[i][bpickupx], BVar[i][bpickupy], BVar[i][bpickupz], BVar[i][bname], BVar[i][bowner], BVar[i][bprice], BVar[i][bpayout], BVar[i][blocked], BVar[i][benterable], BVar[i][binterior], BVar[i][bintx], BVar[i][binty], BVar[i][bintz], BVar[i][bInt]); i++; } mysql_free_result(); return --i; }
Код:
stock LoadBusinessInfo() { new Query[700]; mysql_query("SELECT * FROM businessinfo"); new i = 0; while(mysql_fetch_row(Query)) { sscanf(Query, "p<|>e<dfffs[28]s[24]dddddfff>", BVar[i]); i++; } mysql_free_result(); return --i; }