16.10.2016, 11:48
Hello there everybody,
so this is the problem,
I have a full functioning Vehicle Ownership system, but the thing is, when I close the server's connection and then restart it back, the owned vehicles won't spawn, so is there some way I can do to make all private/owned vehicles spawn on their last position?
This is the saving code I use:
so this is the problem,
I have a full functioning Vehicle Ownership system, but the thing is, when I close the server's connection and then restart it back, the owned vehicles won't spawn, so is there some way I can do to make all private/owned vehicles spawn on their last position?
This is the saving code I use:
PHP код:
stock SaveVehicle(vehicleid){
VehicleInfo[vehicleid][vModel] = GetVehicleModel(vehicleid);
new INI:File = INI_Open(PVPath(vehicleid));
INI_SetTag(File, "VehicleColor");
INI_WriteInt(File, "vColor1", VehicleInfo[vehicleid][vColor1]);
INI_WriteInt(File, "vColor2", VehicleInfo[vehicleid][vColor2]);
INI_SetTag(File, "VehicleCordinates");
INI_WriteFloat(File, "vPosX", VehicleInfo[vehicleid][vPosX]);
INI_WriteFloat(File, "vPosY", VehicleInfo[vehicleid][vPosY]);
INI_WriteFloat(File, "vPosZ", VehicleInfo[vehicleid][vPosZ]);
INI_WriteFloat(File, "vAng", VehicleInfo[vehicleid][vAng]);
INI_SetTag(File, "VehicleInfo");
INI_WriteInt(File, "vModel", VehicleInfo[vehicleid][vModel]);
INI_WriteString(File, "vOwner", VehicleInfo[vehicleid][vOwner]);
INI_WriteInt(File, "vOwned", VehicleInfo[vehicleid][vOwned]);
INI_Close(File);
return 1;
}