15.08.2010, 03:41
Give this a try:
pawn Код:
stock AddVehiclesFromFile(FileName[])
{
if(!fexist(FileName)) return 0;
new File:VehicleFile, vModel, Float:VX, Float:VY, Float:VZ, Float:VA, vTotal, Line[128], vOwner[MAX_PLAYER_NAME+6], C1, C2;
VehicleFile = fopen(FileName, io_read);
while(fread(VehicleFile, Line))
{
unformat(Line, "iffffiis[30]", vModel, VX, VY, VZ, VA, C1, C2, vOwner);
AddStaticVehicleEx(vModel, VX, VY, VZ, VA, -1, -1, (30*60));
format(VEHICLE_OWNER[vTotal][VEHOWNER], 30, vOwner);
vTotal++;
}
fclose(VehicleFile);
return vTotal;
}