Vehicle wont show correctly
#3

Quote:

But now i have the problem that if i sellect car 2 it give's me someone else car from db, is like i am selecting car database id not the menu car id.

What's the code under OnDialogResponse()?

Also:
Code:
for(new i = 1; i <= cache_num_rows(); i++)
I suggest you to use:
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++)
(Or, i = 1 and i <= rows. However, 0 is always the first row so this piece of code skips the first result).
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.
Reply


Messages In This Thread
Vehicle wont show correctly - by MarianImmortalGod - 28.06.2020, 10:22
Re: Vehicle wont show correctly - by SkyFlare - 28.06.2020, 10:32
Re: Vehicle wont show correctly - by Kwarde - 28.06.2020, 10:36
Re: Vehicle wont show correctly - by MarianImmortalGod - 28.06.2020, 10:41
Re: Vehicle wont show correctly - by Kwarde - 28.06.2020, 10:47
Re: Vehicle wont show correctly - by MarianImmortalGod - 28.06.2020, 10:55

Forum Jump:


Users browsing this thread: 1 Guest(s)