08.09.2009, 14:02
Hi, I have function that creates vehicle from database. Today I tried to add components saving.
Thats my function:
It is working without:
But when I add this it crashes player when connecting. Why?
Thanks in advance,
Kacper
Thats my function:
pawn Код:
public CreateVehicleFromSQL(uid)
{
LoadCarTemp(uid);
new pointer = CreateVehicle(TempCar[carModel], TempCar[carLocX], TempCar[carLocY], TempCar[carLocZ], TempCar[carAngle], TempCar[carColor1], TempCar[carColor2], -1);
TempToVeh(pointer);
for(new tune = 0; tune < 16; tune++)
{
if(Cars[pointer][carTuning][tune] != 0)
{
AddVehicleComponent(pointer, Cars[pointer][carTuning][tune]);
}
}
return pointer;
}
pawn Код:
for(new tune = 0; tune < 16; tune++)
{
if(Cars[pointer][carTuning][tune] != 0)
{
AddVehicleComponent(pointer, Cars[pointer][carTuning][tune]);
}
}
Thanks in advance,
Kacper