So , hab jetzt zugriff auf mein Script:
stock SaveCar(vehicleid)
{
if(dini_Exists(CarDat(vehicleid)))
{
new Float:x, Float:y, Float:z, Float:r;
GetVehiclePos(vehicleid, Float:x, Float:y, Float:z);
GetVehicleZAngle(vehicleid, Float:r);
dini_IntSet(CarDat(vehicleid), "ID", GetVehicleModel(vehicleid));
dini_FloatSet(CarDat(vehicleid), "F_X", x);
dini_FloatSet(CarDat(vehicleid), "F_Y", y);
dini_FloatSet(CarDat(vehicleid), "F_Z", z);
dini_FloatSet(CarDat(vehicleid), "F_R", r);
dini_IntSet(CarDat(vehicleid), "F1", 0);
dini_IntSet(CarDat(vehicleid), "F2", 0);
}
else
{
new ac[40];
format(ac, 40, "/Autos/%d.txt", vehicleid);
dini_Create(ac);
new Float:x, Float:y, Float:z, Float:r;
GetVehiclePos(vehicleid, Float:x, Float:y, Float:z);
GetVehicleZAngle(vehicleid, Float:r);
dini_IntSet(CarDat(vehicleid), "ID", GetVehicleModel(vehicleid));
dini_FloatSet(CarDat(vehicleid), "F_X", x);
dini_FloatSet(CarDat(vehicleid), "F_Y", y);
dini_FloatSet(CarDat(vehicleid), "F_Z", z);
dini_FloatSet(CarDat(vehicleid), "F_R", r);
dini_IntSet(CarDat(vehicleid), "F1", 0);
dini_IntSet(CarDat(vehicleid), "F2", 0);
}
}
stock CarDat(vehicleid)
{
new ms[40];
format(ms ,40, "/Autos/%d.txt", vehicleid);
return ms;
}
Den Stock benutze ich dann in einem Befehl, sprich /parken bei dir.