01.06.2010, 18:33
Hi, It is work:
But:
Is not working.
File:
Why, do not create vehicle by coordinates from file ?
Код:
new pname[32];
GetPlayerName(playerid, pname, 32);
new string[128];
format(string, sizeof(string), "%s car", pname);
new File:ftw=fopen(string, io_read);
new clas[128];
new i=0;
new array[7];
while(fread(ftw, clas)){
new n = floatstr(clas);
array[i] = n;
i=i+1;
}
//vehicle model generate
new temp_vmodel[16];
format(temp_vmodel, sizeof(temp_vmodel), "%f", array[0]);
new vmodel = strval(temp_vmodel);
//Coordinates and Angle
new cooX = array[1];
new cooY = array[2];
new cooZ = array[3];
new Angle = array[4];
//Color1 and Color2
new temp_color1[16];
new temp_color2[16];
format(temp_color1, sizeof(temp_color1), "%f", array[5]);
format(temp_color2, sizeof(temp_color2), "%f", array[6]);
new color1 = strval(temp_color1);
new color2 = strval(temp_color2);
Код:
//Creating Vehicle AddStaticVehicle(vmodel,cooX ,cooY ,cooZ ,Angle ,color1 ,color2); fclose(ftw); return 1;
File:
Код:
410 -2148.5969 -935.1008 31.6786 269.9992 9 1

