Disabling/Removing class selection -
Riwerry - 06.11.2013
Hello guys, please how I can disable/remove class selection menu? I'm working on RP mode and I just want, when player type password to register/login, it'll just spawn him, and he don't need to press "Spawn" button. Thanks for your replies.
Re: Disabling/Removing class selection -
HardRock - 06.11.2013
SpawnPlayer(playerid);
Re: Disabling/Removing class selection -
Riwerry - 06.11.2013
Well, and where to put it?
Btw. I am using variable for check if is player logging or he's registering. I want to make if he's logging it will load his positions from .ini. If he's registering, here will be used SetPlayerPos function. I already have scripted these thing what I actually said, but don't know how to make it work with disabling class selection menu. Better said, I don't know to what public I need to put it.
Re: Disabling/Removing class selection -
gotwarzone - 06.11.2013
Код:
new ViewingTextDraws;
public OnPlayerConect(playerid)
{
ViewingTextDraws[playerid] = 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(ViewingTextDraws[playerid] == 1) return 0;
return 1;
}
Re: Disabling/Removing class selection -
Riwerry - 06.11.2013
Mate this didn't work, now is "Spawn" button disabled but I want to skip all this selection.
Re: Disabling/Removing class selection -
erminpr0 - 06.11.2013
Dude add SpawnPlayer(playerid);
onDialogResponse, onPlayerCommandPerformed, whatever you use for Log-in
Re: Disabling/Removing class selection -
Riwerry - 06.11.2013
Yeah dude, but that isn't only about SpawnPlayer(playerid);, I need to have configured on some public this
pawn Код:
{
if (PrihlasujeSa [playerid] == 1) //This is checking if is player logging or registering, value 1 means yes, he is logging
{
SetSpawnInfo (playerid, 0, PouzivateloveInformacie [playerid] [pSkin], PouzivateloveInformacie [playerid] [pPolohaX], PouzivateloveInformacie [playerid] [pPolohaY], PouzivateloveInformacie [playerid] [pPolohaZ], PouzivateloveInformacie [playerid] [pUhol], 0, 0, 0, 0, 0, 0); //Set player positions
SpawnPlayer (playerid);
SetPlayerVirtualWorld (playerid, PouzivateloveInformacie [playerid] [pVirtualnySvet]);
}
else if (PrihlasujeSa [playerid] == 0) //This is check if is player logging or registering, value 0 means register
{
SetPlayerPos(playerid, 1958.33, 1343.12, 15.36); //So I want to spawn him here for example
}
}
Re: Disabling/Removing class selection - Patrick - 06.11.2013
I suggest you using TogglePlayerSpectating it's more accurate, code shown below
pawn Код:
public OnPlayerConnect(playerid)
{
TogglePlayerSpectating(playerid, 1);
return true;
}
//Under your login system
SetSpawnInfo(playerid, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
public OnPlayerSpawn(playerid)
{
TogglePlayerSpectating(playerid, 0)
return true;
}
Re: Disabling/Removing class selection -
Riwerry - 07.11.2013
Yeah mate, I solved it, login works with no problem, but in registration why I need to use SetSpawnInfo? Becouse when I used SetPlayerPos, it won't spawn me. But with SetSpawnInfo it works. How I can solve that?