Re-creating vehicle.
#1

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

To me you havent given the full explanation of what you need done.

From what i am understanding, is that you are not calling it properly. You are destroying the vehicle, but you are not creating a vehicle with the right arrays. You need to make sure you are proceeding by calling back the vehicle model.

Quick read this, if you have it already then forgive my 2.01 am talk
Reply
#3

I've destroyed the vehicle, I try to recreate it and it sometimes gives me the right model and sometimes the wrong model. I need the right model ALL the time.
Reply
#4

bump
Reply
#5

BUMP:

While creating vehicles, something like this would happen.

Burrito = Vehicle ID 9.
On the MySQL DB, vehicle shows a Cop Car. What's wrong with this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)