Disabling/Removing class selection
#1

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.
Reply
#2

SpawnPlayer(playerid);
Reply
#3

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.
Reply
#4

Код:
new ViewingTextDraws;


public OnPlayerConect(playerid)
{
    ViewingTextDraws[playerid] = 1;

}
public OnPlayerRequestSpawn(playerid)
{
    if(ViewingTextDraws[playerid] == 1) return 0;
    return 1;
}
Reply
#5

Mate this didn't work, now is "Spawn" button disabled but I want to skip all this selection.
Reply
#6

Dude add SpawnPlayer(playerid);
onDialogResponse, onPlayerCommandPerformed, whatever you use for Log-in
Reply
#7

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
    }
}
Reply
#8

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;
}
Reply
#9

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)