22.06.2009, 10:36
If you will use command what saves vehicle in dini, it overwrite, what have you saved previously
My command looks like this
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"); }