SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 26/06/2011, 07:00 AM   #1
TaMeD
Big Clucker
 
Join Date: Mar 2009
Posts: 53
Reputation: 0
Default Disable class selection

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.
TaMeD is offline  
Old 26/06/2011, 07:09 AM   #2
Ash.
High-roller
 
Ash.'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,082
Reputation: 163
Default Re: Disable class selection

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.
__________________
TruckingWorld
Work, Play, Make Friends
Written from scratch, and originally released in 2011, play today!
Visit the forum | Play the game
Ash. is offline  
Old 26/06/2011, 07:11 AM   #3
TaMeD
Big Clucker
 
Join Date: Mar 2009
Posts: 53
Reputation: 0
Default Re: Disable class selection

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


Thanks buddy.
TaMeD is offline  
Old 26/06/2011, 07:12 AM   #4
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,793
Reputation: 1179
Default Re: Disable class selection

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.
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline  
Old 26/06/2011, 07:21 AM   #5
Ash.
High-roller
 
Ash.'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,082
Reputation: 163
Default Re: Disable class selection

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.
__________________
TruckingWorld
Work, Play, Make Friends
Written from scratch, and originally released in 2011, play today!
Visit the forum | Play the game
Ash. is offline  
Old 26/06/2011, 07:50 AM   #6
TaMeD
Big Clucker
 
Join Date: Mar 2009
Posts: 53
Reputation: 0
Default Re: Disable class selection

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.

TaMeD is offline  
Old 26/06/2011, 08:11 AM   #7
kin
Big Clucker
 
kin's Avatar
 
Join Date: Jan 2011
Posts: 95
Reputation: 7
Default Re: Disable class selection

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.
__________________
kin is offline  
Old 26/06/2011, 08:37 AM   #8
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,793
Reputation: 1179
Default Re: Disable class selection

Make a dialog i suppose on OnplayerConnect and then yes, I would say press spawn to continue...
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline  
Old 26/06/2011, 08:53 AM   #9
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Re: Disable class selection

I tryed to give SpawnPlayer(playerid); to OnPlayerRequestClass

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
disable class selection? HondaCBR Help Archive 6 21/04/2011 11:15 AM
How to disable speach during class selection. Jmarr Help Archive 2 29/08/2010 07:44 AM
Disable Class Selection Antonio [G-RP] Help Archive 10 24/06/2010 05:56 PM
Disable Class selection falor Help Archive 2 21/04/2010 10:32 AM
help me with Class Selection Showing the class name The_Cobra Help Archive 2 05/02/2010 05:22 PM


All times are GMT. The time now is 09:03 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.