Save car to file
#2

If you will use command what saves vehicle in dini, it overwrite, what have you saved previously

My command looks like this

Code:
if(strcmp(cmdtext,"/save",true, 5)==0)
{
new Float:Pos[3];
new Float:A;
new str[64];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
GetPlayerFacingAngle(playerid, A);
format(str,sizeof(str),"AddStaticVehicle(%i, %f, %f, %f, %f, %i, %i);\r\n",GetVehicleModel(GetPlayerVehicleID(playerid)), Pos[0],Pos[1],Pos[2], random(127), random(127));
new File:f = fopen("vehicles.txt", io_append);
fwrite(f, str);
fclose(f);
SendClientMessage(playerid,RED,"Vehicle saved");
}
Reply


Messages In This Thread
Save car to file - by arnutisz - 22.06.2009, 10:20
Re: Save car to file - by ziomal396 - 22.06.2009, 10:36
Re: Save car to file - by arnutisz - 22.06.2009, 10:40

Forum Jump:


Users browsing this thread: 1 Guest(s)