Vehicle wont show correctly
#4

Quote:
Originally Posted by Kwarde
View Post
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.
Oh thanks man, that is better.

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);
    	}
This code i use to check theyr coords if it matches my cars and not someone else.
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)