Auto Spawn - 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: Auto Spawn (
/showthread.php?tid=276677)
Auto Spawn -
Abreezy - 14.08.2011
I swear this is the biggest problem i've ever had with scripting. I just can't make my auto spawning work.
I want when you register, it automatically spawns you at x,y,z. When you login, i want it to spawn you at your last x,y,z automatically. I don't want them to see/click the spawn button, i just want player to auto spawn.
I have most of this working, except the actual spawning part. The coords for last position save into my database, with ease. But i can't figure out how to make it auto spawn you and such.
I use these enums
Float

pos
Float:ypos
Float:zpos
I'd be extremely thankful if anyone showed me how to do the autospawn..thanks in advance.
Re: Auto Spawn -
Kush - 14.08.2011
A few other people and myself have noticed a problem with the SpawnPlayer function. Sometimes it spawns you. Sometimes it doesn't. Your best bet would be to
SetSpawnInfo then
SpawnPlayer.
Re: Auto Spawn -
Abreezy - 14.08.2011
Quote:
Originally Posted by Kush
A few other people and myself have noticed a problem with the SpawnPlayer function. Sometimes it spawns you. Sometimes it doesn't. Your best bet would be to SetSpawnInfo then SpawnPlayer.
|
Yeah, i've noticed this many times, which is why it never works, lol. So, under register success, i would do, setspawninfo, and spawnplayer?
Do I need any codes in requestspawn or requestclass?
Re: Auto Spawn -
Kush - 14.08.2011
Quote:
Originally Posted by Abreezy
Yeah, i've noticed this many times, which is why it never works, lol. So, under register success, i would do, setspawninfo, and spawnplayer?
Do I need any codes in requestspawn or requestclass?
|
All you need to do, is do what I've said in my previous post.
In my y_ini tutorial, it is being used.
Re: Auto Spawn -
Abreezy - 14.08.2011
Alright, Sounds good, I'll give a test run .