Y_INI Saving vehicles problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Y_INI Saving vehicles problem (
/showthread.php?tid=514505)
Y_INI Saving vehicles problem -
Amel_PAtomAXx - 21.05.2014
I got problem with Y_INI while trying to save cars, each car - each file, by Vehicle ID. It saves a vehicles, but it won't stop doing it till I shut server down. It looks like this: I got 7 Cars in server and when I save cars, INI after saving these 7 continues saving to 8,9,10,11... till i shut down a srv.
pawn Код:
CMD:savecars(playerid, params[])
{
#pragma unused params
for(new i = 0; i < MAX_VEHICLES; i++)
{
SaveCars(i);
}
return 1;
}
pawn Код:
public SaveCars(vehicleid)
{
new INI:File = INI_Open(CarPath(vehicleid));
INI_SetTag(File,"|______Vehicle info______|");
INI_WriteInt(File,"Model", GetVehicleModel(vehicleid));
// And other things like pos, color, interior...
INI_Close(File);
return 1;
}
Re: Y_INI Saving vehicles problem -
Amel_PAtomAXx - 21.05.2014
DP :3
I fixed it...