OnPlayerRequestClass Login Dialog
#1

pawn Код:
ShowDialog(playerid, 2);
This opens the Login dialog after it checks whether the user is registered.

It's under
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
which means it has a spawn button before logging in, if someone presses it, it doesn't spawn them because the dialog opens back up and it automatically spawns them in the place they quit last but after pressing the spawn button and when it gets to the tutorial, the tutorial ends, the player spawns and the tutorial repeats itself after the player spawns, quite hard to explain but I'm sure it's because of this. Is there any other place I can put this?
Reply
#2

Leave it there, and place the player in spectate mode under OnPlayerConnect. This will remove, or rather hide, the class selection box. After logging in/registering the player, remove them from spectate mode and spawn them.
Reply
#3

I put
pawn Код:
TogglePlayerSpectating(playerid, 1);
under
pawn Код:
OnPlayerConnect
and it just loads saying "Connected to Domination Roleplay" and nothing else happens.
Reply
#4

Try this (just looked at an old gamemode of mine):

TogglePlayerSpectating under on OnPlayerRequestClass, login/register and spawn the player (ensure you have used either AddPlayerClass or SetSpawnInfo before you spawn the player, or you will get the "Stay in the world boundaries" mess), then remove from spectating mode.
Reply
#5

Yeah tried it after I posted the previous message, works that way, cheers!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)