SA-MP Forums Archive
anyone knows - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: anyone knows (/showthread.php?tid=210979)



anyone knows - Marcelo Moreno - 14.01.2011

anyone knows where to get a nice saving tutorial. I just don't understand a bit of saving things in scriptfiles or sort of something like that


Re: anyone knows - Fool - 14.01.2011

Use Dini.


Re: anyone knows - Babul - 14.01.2011

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;
}



Re: anyone knows - Steven Paul - 14.01.2011

lol he is banned


Re: anyone knows - Babul - 14.01.2011

hehe he will read the answer anyways