SA-MP Forums Archive
How can i stop this happening - 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: How can i stop this happening (/showthread.php?tid=336058)



How can i stop this happening - Scripter12345 - 21.04.2012

Well i have made it so you have to log in but at the bottom where it has "<" ">" and "spawn" where i click spawn it spawns me in the game im just wondering is there any way of making that stop so if i click it nothing happens


Thank You


Please Help Me Please


Re: How can i stop this happening - Face9000 - 21.04.2012

Just return 0; on OnPlayerRequestSpawn.


Re: How can i stop this happening - Ainseri - 21.04.2012

You can return 0 under OnPlayerRequestSpawn, I believe. But you can also just remove those "< > Spawn" things by putting the player into spectator mode. However, be aware that upon taking them out of spec mode, OnPlayerSpawn is called.


Re: How can i stop this happening - MP2 - 21.04.2012

Use TogglePlayerSpectating to put the player in to spectating mode, then show your login dialog, and when they respond to the dialog simple set TogglePlayerSpectating to 0/false and it will spawn them. You may also want to set their camera position for a 'login screen' - this should be done on a ~150 MS timer (doesn't work straight after TogglePlayerSpectating).