[HELP] Spawning - 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: [HELP] Spawning (
/showthread.php?tid=127974)
[HELP] Spawning -
Worthy - 15.02.2010
I have it set so that when you choose a new class you spawn at the train station in San Fierro. That works perfectly.
When you logout, eg next to SFPD, then you will log back in and spawn at SFPD. Also when you die you'll then respawn at SFPD.
Does anybody know how to fix this?
Regards,
Worthy
Re: [HELP] Spawning -
IcyBlight - 15.02.2010
Not quite sure on the Login thing, but you should make it save his last location into a file.. and OnPlayerConnect, check if that position in that file exists for a player, if it does, set his position there.
And the on player death thing, I think you should use SetSpawnInfo. My best guess.
Re: [HELP] Spawning -
Worthy - 16.02.2010
Quote:
Originally Posted by IcyBlight
Not quite sure on the Login thing, but you should make it save his last location into a file.. and OnPlayerConnect, check if that position in that file exists for a player, if it does, set his position there.
And the on player death thing, I think you should use SetSpawnInfo. My best guess. 
|
I don't want him to spawn at his last position, that's the thing.
Re: [HELP] Spawning -
IcyBlight - 16.02.2010
Oh so what then?
You said "if hes next to SFPD and relog he'll spawn at SFPD"
You want him to spawn at the nearest major building or place when he logs out? Or just at the SFPD?
If you want him to the closest, make a PlayerToPoint or something to the places, and save the closest one as spawn coordinates.
If you want him to always spawn at SFPD when logging in/out, OnPlayerSpawn -> if(check if he has a spawn cords file) -> SetPlayerPos(playerid, SFPD location);
If this isn't what you mean, then I'm sorry but I'm confused
Re: [HELP] Spawning -
Worthy - 17.02.2010
I'm trying to tell you that the user will spawn at the place they logged out at.
Re: [HELP] Spawning -
Mike Garber - 17.02.2010
Under OnPlayerSpawn there's something that makes you spawn at a saved location from a file.
Re: [HELP] Spawning -
bajskorv123 - 17.02.2010
Its like spawn points?
If i logout at sfpd, ill spawn at sfpd.
If i die, i will spawn at sfpd (Because i visited that spawnpoint latest?)