29.10.2010, 22:48
hey, can anyone help me with this huge problem i have with my car saving system?
this is all i get once i fully tune a car:
x=-1922.747314
y=231.678558
z=34.398799
a=91.144309
Colour=0
Colour2=0
Component1=0
Component2=0
Component3=0
Component4=0
Component5=0
Component6=0
Component7=0
Component8=0
Component9=0
Component10=0
Component11=0
Component12=0
oh, and can somone fix the things i commented out.. i get errors from changevehiclepaintjob..
caio!
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
new color1, color2;
// new paintjobid;
new componentid;
format(CarFile, sizeof(CarFile), "Core/vehicle%d.ini", vehicleid);
if(!dini_Exists(CarFile)) dini_Create(CarFile);
GetVehicleComponentType(componentid);
ChangeVehicleColor(vehicleid, color1, color2);
GetVehiclePos(vehicleid, posx, posy, posz);
GetVehicleZAngle(vehicleid, posa);
dini_FloatSet(CarFile, "x", posx);
dini_FloatSet(CarFile, "y", posy);
dini_FloatSet(CarFile, "z", posz);
dini_FloatSet(CarFile, "a", posa);
// dini_IntSet(CarFile, "Paintjob", paintjobid);
dini_IntSet(CarFile, "Colour", color1);
dini_IntSet(CarFile, "Colour2", color2);
dini_IntSet(CarFile, "Component1", componentid);
dini_IntSet(CarFile, "Component2", componentid);
dini_IntSet(CarFile, "Component3", componentid);
dini_IntSet(CarFile, "Component4", componentid);
dini_IntSet(CarFile, "Component5", componentid);
dini_IntSet(CarFile, "Component6", componentid);
dini_IntSet(CarFile, "Component7", componentid);
dini_IntSet(CarFile, "Component8", componentid);
dini_IntSet(CarFile, "Component9", componentid);
dini_IntSet(CarFile, "Component10", componentid);
dini_IntSet(CarFile, "Component11", componentid);
dini_IntSet(CarFile, "Component12", componentid);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
new componentid;
new color1, color2;
format(CarFile, sizeof(CarFile), "Core/vehicle%d.ini", vehicleid);
if(!dini_Exists(CarFile)) { dini_Create(CarFile);
} else {
posx = dini_Float(CarFile, "x");
posy = dini_Float(CarFile, "y");
posz = dini_Float(CarFile, "z");
posa = dini_Float(CarFile, "a");
SetVehiclePos(vehicleid, posx, posy, posz);
SetVehicleZAngle(vehicleid, posa);
AddVehicleComponent(vehicleid, componentid);
//dini_Get(CarFile, "Paintjob", paintjobid);
dini_Get(CarFile, "Colour", color1);
dini_Get(CarFile, "Colour2", color2);
dini_Get(CarFile, "Component1", componentid);
dini_Get(CarFile, "Component2", componentid);
dini_Get(CarFile, "Component3", componentid);
dini_Get(CarFile, "Component4", componentid);
dini_Get(CarFile, "Component5", componentid);
dini_Get(CarFile, "Component6", componentid);
dini_Get(CarFile, "Component7", componentid);
dini_Get(CarFile, "Component8", componentid);
dini_Get(CarFile, "Component9", componentid);
dini_Get(CarFile, "Component10", componentid);
dini_Get(CarFile, "Component11", componentid);
dini_Get(CarFile, "Component12", componentid);
}
return 1;
}
new CarFile[50], Float:posx, Float:posy, Float:posz, Float:posa;
this is all i get once i fully tune a car:
x=-1922.747314
y=231.678558
z=34.398799
a=91.144309
Colour=0
Colour2=0
Component1=0
Component2=0
Component3=0
Component4=0
Component5=0
Component6=0
Component7=0
Component8=0
Component9=0
Component10=0
Component11=0
Component12=0
oh, and can somone fix the things i commented out.. i get errors from changevehiclepaintjob..
caio!