SA-MP Forums Archive
Player spawns where he died script help? - 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: Player spawns where he died script help? (/showthread.php?tid=68687)



Player spawns where he died script help? - CrypticPoptart - 12.03.2009

I'm not putting this in the request topic because I don't want someone to make me the whole script. If anyone knows of a script like this someone already made I couldn't find one so if you could link to it that would be nice. If not, could you please tell me how I might go about this? I don't really know where to start with it. I'm a pretty good scripter so if someone could just give me a few pointers I could probably do it. Thanks for any help you can give!


Re: Player spawns where he died script help? - On_Top_Non_Stop - 12.03.2009

At the top of your script.
new FloateathPosition[MAX_PLAYERS][3];

Under OnPlayerDeath
GetPlayerPos(playerid,DeathPosition[playerid][0],DeathPosition[playerid][1],DeathPosition[playerid][2]);

Under OnPlayerSpawn
if(DeathPosition[playerid][0] != 0)SetPlayerPos(playerid,DeathPosition[playerid][0],DeathPosition[playerid][1],DeathPosition[playerid][2]);