Disable class selection
#1

Hey there. My problem is that I would like to effectively disable or bypass class selection.
I've made a registration system that uses multiple dialogs to get information from the user.
However, after the user enters information in the first dialog, as well as then coming up with the second dialog, it goes to the class selection screen. My problem is that I don't want the user having access to the class selection screen, and I'd like to spawn users myself using SpawnPlayer

I've been through the wiki, but I can't figure out how to fix it.

Can someone please help? Thanks.
Reply
#2

I've never tried, but if I were to try i'd do:

pawn Code:
public OnPlayerConnect(playerid)
{
     SpawnPlayer(playerid);
     return 1;
}
Then handle your dialogs BELOW the SpawnPlayer bit, when you have spawned them maybe toggle them uncontrollable and set them way above the map somewhere so they can just see the sky, then do your dialog thing. Once thats all completed set their Spawn information variables and then SpawnPlayer where you want them.

That would be my attempt anyway.
Reply
#3

Actually, that's a great idea. Just freeze them, change where the camera's looking at and do the dialogs then.


Thanks buddy.
Reply
#4

Quote:
Originally Posted by funky1234
View Post
I've never tried, but if I were to try i'd do:

pawn Code:
public OnPlayerConnect(playerid)
{
     SpawnPlayer(playerid);
     return 1;
}
Then handle your dialogs BELOW the SpawnPlayer bit, when you have spawned them maybe toggle them uncontrollable and set them way above the map somewhere so they can just see the sky, then do your dialog thing. Once thats all completed set their Spawn information variables and then SpawnPlayer where you want them.

That would be my attempt anyway.
That wouldn't work, I tried that once, failed for me...

Perhaps you might need need to set a timer.
Reply
#5

Quote:
Originally Posted by TaMeD
View Post
Actually, that's a great idea. Just freeze them, change where the camera's looking at and do the dialogs then.


Thanks buddy.
Anytime

Quote:
Originally Posted by Lorenc_
View Post
That wouldn't work, I tried that once, failed for me...

Perhaps you might need need to set a timer.
Hmm yes a timer could work. - But how?
I suppose you could actually check when the player has actually moved into class selection, by comparing their position from when they connected to after the second dialog is shown. If they have moved, then move them somewhere in the sky and set the camera elsewhere, then toggle them uncontrollable? Then do your dialog stuff.
Reply
#6

What I did was, spawned them (frozen under the camera in their own virtual world), did the dialogs, then respawned them with the correct information.

Worked flawlessly.

Reply
#7

I would just switch when the dialogs are called to on player request class, so then when the first dialog is bypassed all you would have to do in the first dialog is


SpawnPlayer(playerid);


or whatever method you used.
Reply
#8

Make a dialog i suppose on OnplayerConnect and then yes, I would say press spawn to continue...
Reply
#9

I tryed to give SpawnPlayer(playerid); to OnPlayerRequestClass

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    SpawnPlayer(playerid);
    return 1;
}
for me it was working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)