PDA

View Full Version : spawn command with save+autoload


gotwarzone
20/10/2013, 04:55 PM
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.

park4bmx
20/10/2013, 05:25 PM
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

gotwarzone
20/10/2013, 08:18 PM
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.