How to make people spawn at the location they /q'ed
#1

title says everything. I tried searching out wiki but I didn't find sh*t.
Reply
#2

Seems like no one has guts to help me xD
Reply
#3

This may help you https://sampforum.blast.hk/showthread.php?tid=242418
Reply
#4

Save the position in a file/database when they leave (OnPlayerDisconnect() and spawn them to the saved position when they rejoin again (onPlayerSpawn()
Reply
#5

@Crypress - I already got crash recover scripted in the GM.
@Sinner Can make a code? :P btw i use Dini
Reply
#6

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"));
Reply
#7

@Stigg Thanks, I guess that would help me out I'll try and reply.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)