not a tutorial but a simple command to save your position in scriptfiles/. no need to search for doc and settings/blabla/lfkgjhf/948759028347098///////
Код:
CMD:shp(playerid, cmdtext[]){
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,MSGFAIL_COLOR,"Command not available.");
return 1;
}
new Comment[128];
sscanf(cmdtext,"z",Comment);
new Float:X,Float:Y,Float:Z,Float:A;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
new filename[64];
format(filename,sizeof(filename),"SavedHousePositions.txt");
new File:fPlayerPosition=fopen(filename,io_append);
new string[128];
format(string,sizeof(string),"%4.4f %4.4f %4.4f %4.4f Zone %d %s\r\n",X,Y,Z,A,GetPVarInt(playerid,"Zone"),Comment);
fwrite(fPlayerPosition,string);
fclose(fPlayerPosition);
format(string,sizeof(string),"House Position saved (%f,%f,%f - %f). Zone: %d %s",X,Y,Z,A,GetPVarInt(playerid,"Zone"),Comment);
SendClientMessageToAll(MSGDBUG_COLOR,string);
return 1;
}