Something
public text v1 · immutableif(strcmp(cmdtext,"/coords",true)==0) {
new Float:X,Float:Y,Float:Z;
new coord[256];
new File:fhandle;
GetPlayerPos(playerid,X,Y,Z);
fhandle = fopen("Coords.txt",io_append);
format(coord,sizeof(coord),"Coords: X: %0.2f Y: %0.2f Z: %0.2f",X,Y,Z);
SendClientMessage(playerid,0xFFFFFFAA,string);
fwrite(fhandle,coord);
fclose(fhandle);
}