So I want to make it so the player has to make a character before he can spawn, in a menu he can't close...
so how do I do a character system as in, not letting the player spawn, and choosing character to set your name and model.
Well, do you at least know where to start?
The player is going to spawn by default, but you can at least assign them to a spectator team, or restrict movement / disable collisions / make invisible as they operate the menu for the first time.
In the meantime, have them pick a character from a menu and network it back to the server, run some checks to make sure the model is valid / the player can use it, then after that check [B]checks[/B] outs, assign the player that model.
For extra security, have the server network the client to open the menu, once the client sends to the server the model they chose and it processed correctly, network the client to close the menu.
First you need to prevent the player from spawning. You could try setting a bool using the PlayerInitialSpawn hook and preventing PlayerSpawn from doing anything until the condition is met.
Second you need to get the menu open. Once again you can use the former hook to set that up. Whether you want to use net.Send or PLAYER:SendLua is up to you.
Third you need the menu itself. You'll need to design that part with elements that allow the player to input stuff, dTextEntry would be the one here.
Fourth you need to then network the data the player entered into the menu to the server. You'll need to use net.Send and net.Receive for this one. I'd recommend using a button to confirm they are ready rather than having them press enter or something in the text entry.
Fifth you have to set the variables onto the player and finally spawn him in. You can probably do all that within the net.Receive from above.
Optional sixth would be saving their data onto a database.
Sorry, you need to Log In to post a reply to this thread.