SA-MP Forums Archive
1 best Scriper help me - 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: 1 best Scriper help me (/showthread.php?tid=83585)



1 best Scriper help me - WoodPecker - 26.06.2009

How do we save spawn after the player quit the game?

I mean when he finishes the tutorial and he goes at the Hospital, How to save his spawn after he quit the game? I mean he will be back in the same spawn (Hospital) as he leaves.

TNX for best Scripter for create that SC xD


Re: 1 best Scriper help me - MenaceX^ - 26.06.2009

Save his positions to somewhere, then load them when the player logins or how ever you load the player's info, then set the player pos in these positions.


Re: 1 best Scriper help me - James_Alex - 26.06.2009

you can use the include dini for more easy
pawn Код:
public OnPlayerDisconnecte(playerid)
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
dini_FloatSet(thefile, "PosX", X);
dini_FloatSet(thefile, "PosY", Y);
dini_FloatSet(thefile, "PosZ", Z);
return 1;
}

public OnPlayerSpawn(playerid)
{

SetPlayerPos(playerid, dini_Float(thefile, "PosX"), dini_Float(thefile, "PosY"), dini_Float(thefile, "PosZ"));
return 1;