How to make people spawn at the location they /q'ed - 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: How to make people spawn at the location they /q'ed (
/showthread.php?tid=247499)
How to make people spawn at the location they /q'ed -
anant - 09.04.2011
title says everything. I tried searching out wiki but I didn't find sh*t.
Re: How to make people spawn at the location they /q'ed -
anant - 09.04.2011
Seems like no one has guts to help me xD
Re: How to make people spawn at the location they /q'ed -
Cypress - 09.04.2011
This may help you
https://sampforum.blast.hk/showthread.php?tid=242418
Re: How to make people spawn at the location they /q'ed -
Sinner - 09.04.2011
Save the position in a file/database when they leave (OnPlayerDisconnect()

and spawn them to the saved position when they rejoin again (onPlayerSpawn()
Re: How to make people spawn at the location they /q'ed -
anant - 09.04.2011
@Crypress - I already got crash recover scripted in the GM.
@Sinner Can make a code? :P btw i use Dini
Re: How to make people spawn at the location they /q'ed -
Stigg - 09.04.2011
Quote:
Originally Posted by anant
@Crypress - I already got crash recover scripted in the GM.
@Sinner Can make a code? :P btw i use Dini
|
Try something like:
OnPlayerDisconnect
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
dini_FloatSet(file, "PositionX", x);
dini_FloatSet(file, "PositionY", y);
dini_FloatSet(file, "PositionZ", z);
OnPlayerSpawn
pawn Код:
SetPlayerPosition(playerid, dini_Int(file, "PositionX"));
SetPlayerPosition(playerid, dini_Int(file, "PositionY"));
SetPlayerPosition(playerid, dini_Int(file, "PositionZ"));
Re: How to make people spawn at the location they /q'ed -
anant - 09.04.2011
@Stigg Thanks, I guess that would help me out

I'll try and reply.