Hello,
There is my code:
Код:
new Float:x, Float:y, Float:z;
new count = 0;
GetPlayerPos(playerid, x, y, z)
new File: file = fopen("cars.cfg", io_read);
if (file)
{
while(fread(file, string))
{
count++;
}
// fwrite(file, "%d,%d,%d,%d,%d,%d,%d,%s,%s,%d,,%d,%d);
CreateVehicle(idveh, x+5, y, z, 82.2873, 0, 1, -1);
format(string, 128, "\r\n %d,%d,%d,%d,82,1,1,Dealership,Test,5000,,0,0", idveh,x,y,z);
fwrite(file, string);
fclose(file);
}
else
{
SendClientMessage(playerid,COLOR_RED,"Impossible d'ouvrir le fichier cars.cfg"); // not possible to open the file
return 1;
}
But, nothing is written, normal?