Class selection only the first time
#1

Hey!

I've encountered a problem and was unable to find a way out.
I want the class selection thing to show up only the first time you login. That means you register the first time, choose a class and the next time you will not get the class selection screen, but return where you were.

How is that possible to do?
Reply
#2

This depends on when you let the players register. Are they obliged to register when they first connect? If so, if they're not registered, return 0 in OnPlayerRequestSpawn. This will stop them from spawning.
Then in OnPlayerRequestClass, spawn them if they're logged in (SetSpawnInfo + SpawnPlayer), otherwise let them view the classes if not.
Reply
#3

It's simple assign a variable example:
pawn Код:
enum PlayerInfo
{
Your variables are here.
blabla
}
new your_enum_variable_here
Then when the player logs in for the first time
Put this.
pawn Код:
blabla = 1;
Make this variable save upon disconnect then when he logs in again OnPlayerRequestClass check if that variable is 1 if 1 then instant spawn him if 0 then not, if you still didn't get it reply here and I will try to explain as much as I can.
Reply
#4

Thank you very much! Valuable information
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)