Saving JUST coordinates to a file
#1

Anyone know how to make a cmd like /getpos

and make it save just the X, Y, and Z coordinates to a file?

say I want the file to be called savedcoordinates.txt

how do I make it to where it won't overwrite what's already on there? I know /save exists but I need a /getpos for other reasons.
Reply
#2

pawn Code:
if(!strcmp(cmdtext,"/save2",true))
{
    new Float:x,Float:y,Float:z,Stringy[128];
    GetPlayerPos(playerid,x,y,z);
    new File:Saves = fopen("savedcoordinates.txt", io_append);
    format(Stringy,128,"%f , %f , %f,\r\n",x,y,z);
    fwrite(Saves,Stringy);
    fclose(Saves);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)