Something is up with this code. [+REP]
#1

NEW;
When I /editcar park, some of my vehicles models change. And they're not suppose too. It's gotta do something with this;
pawn Код:
format(query, sizeof(query), "SELECT * FROM Vehicles WHERE carid=%d", vehicle);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(row);
    split(row, arrCoords, '|');
    DestroyVehicle(vehicle);
    new Carid = CreateVehicle(strval(arrCoords[1]), floatstr(arrCoords[2]), floatstr(arrCoords[3]), floatstr(arrCoords[4]), floatstr(arrCoords[5]), strval(arrCoords[6]), strval(arrCoords[7]), 60000);
I'm new to MySQLl so I'm not sure if I'm doing things right.

I'm trying to get the vehicle's information by using its ingame ID, and sometimes it gives me wrong stuff. Ideas?
Reply
#2

https://sampwiki.blast.hk/wiki/Strval
Reply
#3

It's kinda late, and I have no clue what I'm doing at the moment, can you please explain more? I apologize.
Reply
#4

Nevermind, I looked at another part of my code, thanks.
Reply
#5

NEW;
When I /editcar park, some of my vehicles models change. And they're not suppose too. It's gotta do something with this;
pawn Код:
format(query, sizeof(query), "SELECT * FROM Vehicles WHERE carid=%d", vehicle);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(row);
    split(row, arrCoords, '|');
    DestroyVehicle(vehicle);
    new Carid = CreateVehicle(strval(arrCoords[1]), floatstr(arrCoords[2]), floatstr(arrCoords[3]), floatstr(arrCoords[4]), floatstr(arrCoords[5]), strval(arrCoords[6]), strval(arrCoords[7]), 60000);
I'm new to MySQLl so I'm not sure if I'm doing things right.

I'm trying to get the vehicle's information by using its ingame ID, and sometimes it gives me wrong stuff. Ideas?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)