28.06.2020, 10:41
Quote:
What's the code under OnDialogResponse()?
Also: Code:
for(new i = 1; i <= cache_num_rows(); i++) Code:
for (new i, rows = cache_num_rows(); i < rows; i++) //Or, even better yet: new rows; cache_get_row_count(rows); for (new i; i < rows; i++) When you use cache_num_rows() in the statement part of the for() loop, it gets called every loop. When you assign it the way I did, cache_num_rows() is called once. Also: https://forum.sa-mp.com/showpost.php...4&postcount=12 Also also, I highly recommend you to use threaded queries. If your MySQL server would be lagging somehow, your entire server will freeze for everyone after using /v untill the results come in and are handled. |
Code:
case DIALOG_CARS: { new string[64], carid = listitem; format(string, sizeof(string), "Selected: %d - PosX: %f", carid, CarInfo[carid][CarPosX]); SCM(playerid, -1, string); }