SpawnPlayer - 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: SpawnPlayer (
/showthread.php?tid=259726)
SpawnPlayer -
[RVRP]Tyler - 05.06.2011
I just got back into scripting and I've run into the same problem that I have faced in the past, but I can't remember how (if ever) I fixed it.
For some reason when I use SpawnPlayer(playerid); it never works.
For example, on my login dialog once they log in they are supposed to be spawned. So I load all of their information, etc.. and then at the end I put "SpawnPlayer(playerid); and it does not spawn me, it's like nothing happens when it is supposed to spawn me.
Any ideas?
Re: SpawnPlayer -
xRyder - 05.06.2011
Have you tried with
SetSpawnInfo().
You can always try to print something and see it SpawnPlayer() even gets called.
Re: SpawnPlayer -
[RVRP]Tyler - 05.06.2011
Quote:
Originally Posted by xRyder
Have you tried with SetSpawnInfo().
You can always try to print something and see it SpawnPlayer() even gets called.
|
I tried SetSpawnInfo and it did spawn the player but for some reason the camera is stuck, but you can move the player around. Is this normal and how do I fix it?
Re: SpawnPlayer -
xRyder - 05.06.2011
Hmm, try with
SetCameraBehindPlayer() after spawning the player.
Re: SpawnPlayer -
Mean - 05.06.2011
No, no, just return 0 in OnPlayerRequestClass, should work, and yeah you must use SetSpawnInfo.
pawn Код:
public OnPlayerRequestClass( playerid, classid ) {
return 0;
}