SA-MP Forums Archive
spawn command with save+autoload - 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)
+--- Thread: spawn command with save+autoload (/showthread.php?tid=470986)



spawn command with save+autoload - gotwarzone - 20.10.2013

Can please anyone show me how to make /spawn command?

When player use /spawn then save player current position, if player died then spawn back where he use /spawn. Then If player disconnect to the server after he went back to server spawn him back again in the same position where he used /spawn.

Additional to that if /rspawn - then reset player spawn to normal spawn points. And is it possible to always setplayer virtual world to 0 ? Dont use Getplayervirtualworld.



Anyway Im using y_ini saving system.


Re: spawn command with save+autoload - park4bmx - 20.10.2013

pawn Код:
new Float:pPos[3];

//spawn command
if(pPos[0] = 0 & pPos[1] = 0 & pPos[2] = 0)
{
GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
}else{
SetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
}
no saving


Re: spawn command with save+autoload - gotwarzone - 20.10.2013

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
pawn Код:
new Float:pPos[3];

//spawn command
if(pPos[0] = 0 & pPos[1] = 0 & pPos[2] = 0)
{
GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
}else{
SetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
}
no saving
how about the command /spawn? thanks alot but still need the saving.