22.02.2012, 22:49
I got a problem, the server isnt seting the vw to the cars
pawn Код:
mysql_store_result();
new Carid = 0;
while( mysql_retrieve_row( ) )
{
Carid++;
mysql_get_field("vehicleid",string); CarData[Carid][vSQLID] = strval(string);
mysql_get_field("Owner", string); strmid(CarData[Carid][Owner], string, 0, strlen(string), 255);
mysql_get_field("Model",string); CarData[Carid][vModel] = strval(string);
mysql_get_field("X",string); CarData[Carid][VPos][0] = floatstr(string);
mysql_get_field("Y",string); CarData[Carid][VPos][1] = floatstr(string);
mysql_get_field("Z",string); CarData[Carid][VPos][2] = floatstr(string);
mysql_get_field("Angle",string); CarData[Carid][VPos][3] = floatstr(string);
mysql_get_field("Color1",string); CarData[Carid][vColors][0] = strval(string);
mysql_get_field("Color2",string); CarData[Carid][vColors][1] = strval(string);
mysql_get_field("Mod1",string); CarData[Carid][Vmod][0] = strval(string);
mysql_get_field("Mod2",string); CarData[Carid][Vmod][1] = strval(string);
mysql_get_field("Mod3",string); CarData[Carid][Vmod][2] = strval(string);
mysql_get_field("Mod4",string); CarData[Carid][Vmod][3] = strval(string);
mysql_get_field("Mod5",string); CarData[Carid][Vmod][4] = strval(string);
mysql_get_field("Mod6",string); CarData[Carid][Vmod][5] = strval(string);
mysql_get_field("Mod7",string); CarData[Carid][Vmod][6] = strval(string);
mysql_get_field("Mod8",string); CarData[Carid][Vmod][7] = strval(string);
mysql_get_field("Mod9",string); CarData[Carid][Vmod][8] = strval(string);
mysql_get_field("Mod10",string); CarData[Carid][Vmod][9] = strval(string);
mysql_get_field("Mod11",string); CarData[Carid][Vmod][10] = strval(string);
mysql_get_field("Mod12",string); CarData[Carid][Vmod][11] = strval(string);
mysql_get_field("Mod13",string); CarData[Carid][Vmod][12] = strval(string);
mysql_get_field("Range",string); CarData[Carid][Range] = floatstr(string);
mysql_get_field("Health",string); CarData[Carid][vHealth] = floatstr(string);
mysql_get_field("Type",string); CarData[Carid][Type] = strval(string);
mysql_get_field("RentPrice",string); CarData[Carid][RentPrice] = strval(string);
mysql_get_field("Price",string); CarData[Carid][Price] = strval(string);
mysql_get_field("Fuel",string); CarData[Carid][Fuel] = strval(string);
mysql_get_field("Faction",string); CarData[Carid][Faction] = strval(string);
mysql_get_field("Job",string); CarData[Carid][Job] = strval(string);
mysql_get_field("Buyable",string); CarData[Carid][Buyable] = strval(string);
mysql_get_field("Locked",string); CarData[Carid][Locked] = strval(string);
mysql_get_field("Rentable",string); CarData[Carid][Rentable] = strval(string);
mysql_get_field("ParkX",string); CarData[Carid][ParkPos][0] = floatstr(string);
mysql_get_field("ParkY",string); CarData[Carid][ParkPos][1] = floatstr(string);
mysql_get_field("ParkZ",string); CarData[Carid][ParkPos][2] = floatstr(string);
mysql_get_field("ParkAngle",string); CarData[Carid][ParkPos][3] = floatstr(string);
mysql_get_field("fCarID",string); CarData[Carid][FCarID] = strval(string);
mysql_get_field("Alarm",string); CarData[Carid][Alarm] = strval(string);
mysql_get_field("Locks",string); CarData[Carid][Lock] = strval(string);
mysql_get_field("Immobiliser",string); CarData[Carid][Immobiliser] = strval(string);
mysql_get_field("Bought",string); CarData[Carid][Bought] = strval(string);
mysql_get_field("Insurance",string); CarData[Carid][Insurance] = strval(string);
mysql_get_field("World",string); CarData[Carid][vWorld] = strval(string);
mysql_get_field("Weapon1",string); CarData[Carid][vWeapons][0] = strval(string);
mysql_get_field("Weapon2",string); CarData[Carid][vWeapons][1] = strval(string);
mysql_get_field("Weapon3",string); CarData[Carid][vWeapons][2] = strval(string);
mysql_get_field("Ammo1",string); CarData[Carid][vAmmo][0] = strval(string);
mysql_get_field("Ammo2",string); CarData[Carid][vAmmo][1] = strval(string);
mysql_get_field("Ammo3",string); CarData[Carid][vAmmo][2] = strval(string);
mysql_get_field("XMRadio",string); CarData[Carid][XMRadio] = strval(string);
CreateVehicle(CarData[Carid][vModel], CarData[Carid][ParkPos][0],CarData[Carid][ParkPos][1],CarData[ParkPos][VPos][2],CarData[Carid][ParkPos][3],CarData[Carid][vColors][0],CarData[Carid][vColors][1], -1);
SetVehicleVirtualWorld(Carid, Carid+1);
SetVehiclePos(Carid, CarData[Carid][ParkPos][0],CarData[Carid][ParkPos][1],CarData[ParkPos][VPos][2]);
ChangeVehicleColor(Carid, CarData[Carid][vColors][0], CarData[Carid][vColors][1]);
if(IsACopCar(Carid)) {
SetVehicleVirtualWorld(Carid, 0);
}
}