[HELP] Spawn Point Save - 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: [HELP] Spawn Point Save (
/showthread.php?tid=144346)
[HELP] Spawn Point Save -
andershh - 26.04.2010
How can i save my spawn point?
like i spawn on the place i logged off.
To me you either spawn on newb spawn or your familie house. How can i remove it? or add a place saver?
THNX I NEED IT
Re: [HELP] Spawn Point Save -
Onyx09 - 26.04.2010
well you need to try something like
Код:
Public OnPlayerDissconect
{
new float:LogX,float:LogY,float:LogZ;
GetPlayerPos(playerid, LogX,LogY,LogZ);
and use a varibale to save this cords for example
PlayerInfo[playerid][logpositionX] = LogX;
PlayerInfo[playerid][logpositionX] = Log,Y;
PlayerInfo[playerid][logpositionX] = LogZ;
}
and then on player spawn you make a call back
public onplayerspawn
{
if(!PlayerInfo[playerid][logposition]= 0)
{
new LogX = PlayerInfo[playerid][logpositionX];
new LogY = PlayerInfo[playerid][logpositionY];
new LogZ = PlayerInfo[playerid][logpositionZ];
SetPlayerPost(playerid,LogX,LogY,LogZ);
}
}
thats an example and wont work 100% just trying to help you understand