Class Selection - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Class Selection (
/showthread.php?tid=153066)
Class Selection -
Antonio [G-RP] - 06.06.2010
My server currently has a Class Selection when you connect. I want to remove that and just have you login/register. Any ideas?
Re: Class Selection -
coole210 - 06.06.2010
I don't have class selection
Well, i do but its just like a normal new.pwn selection, when u click shift or spawn it automatically sets your job..
Try SpawnPlayer
Re: Class Selection -
Antonio [G-RP] - 07.06.2010
What I want to do is bypass the skin selection in the beggining, where if you are first registering it will auto-set your skin.
Re: Class Selection -
Calgon - 07.06.2010
Check if a player account exists, if it exists: Spawn the player with their correct attributes
If the account doesn't exist: Don't spawn the player and force them in to the character selection menu.
It's pretty simple really.
Re: Class Selection -
Antonio [G-RP] - 07.06.2010
Well I want them to spawn either way, and they need to go to binco to buy clothes later on.
Re: Class Selection -
Calgon - 07.06.2010
Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
Well I want them to spawn either way, and they need to go to binco to buy clothes later on.
|
Oh, my apologies, misread.
Simply remove anything that sends a player to the class selection, send a dialog OnPlayerConnect, once they'd entered the text in and it's all correct, spawn them, remove all of your code from the OnPlayerRequestClass or OnPlayerRequestClass and all instances of ForceClassSelection.
Re: Class Selection -
snoob - 07.06.2010
hey, if ever that help ...
I use an evil timer to spawn the player a short time after they request any class...
usually the client(on fist class request after a connection) is not ready to be spawned...
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
//SpawnPlayer(playerid) // This will probably not work, usualy the client is not ready
SetTimerEx("SpawnMe", 500, false, "i", playerid);// what i do is to spawn them 500 MS after they request a class...
return 1;
}
// small public function...
forward SpawnMe(playerid);
public SpawnMe(playerid)
{
SpawnPlayer(playerid);
return 1;
}
This is a very simple example...
there is a lot of room for improvement
Good Luck