Crash[rep] - 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: Crash[rep] (
/showthread.php?tid=324984)
Crash[rep] -
Dan_Barocu - 11.03.2012
what to i do so if i get crash and i get back to the same crash location..understand??please help giving rep!
Re: Crash[rep] -
Dan_Barocu - 11.03.2012
or if i relog i want the location from where i reloged.
Re: Crash[rep] -
mrskull42 - 11.03.2012
Please explain more, I can't seem to understand what you mean.
Re: Crash[rep] -
eesh - 11.03.2012
pawn Code:
new died[MAX_PLAYERS];
public OnPlayerDeath(playerid,killerid,reason)
{
died[playerid] =1;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(died[playerid] == 1)
{
SetPlayerPos(playerid,...);//hospital coords...
died[playerid]=0;
}
return 1;
}
This will spawn you at hospital.
Save the players X,Y,Z when he disconnects and Load when he logs him. Spawn him with those coords when he spawns
Re: Crash[rep] -
Infamous - 11.03.2012
Save the players last known position to their player file and load it once they have spawned.
Edit: solution posted above my post.
Re: Crash[rep] -
mrskull42 - 11.03.2012
Read this
https://sampforum.blast.hk/showthread.php?tid=48439 it may help you
Re: Crash[rep] -
Dan_Barocu - 11.03.2012
well u dont understand..so if i relog i want him to spawn from where he loged..get it?
Re: Crash[rep] -
WardenCS - 11.03.2012
make the coords save when u disconnect and when u log then set players pos there
Re: Crash[rep] -
mrskull42 - 11.03.2012
There's a tutorial on how to do this, use
https://sampforum.blast.hk/showthread.php?tid=276694 hope it helps
Re: Crash[rep] -
Dan_Barocu - 11.03.2012
yep..i tried and no work..as u can see the comments from tutorial..not a good tutorial..can u show me what to do??