Skip class selection on player connect
#1

Hy

How can i disable the class selection on startup?
I tried with SpawnPlayer, SetPlayerPos, but its dont work...

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
    PlayerInfo[playerid][pModel] = Peds[classid][0];
    if(gPlayerLogged[playerid] == 0)
    {
      SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,-1657.5237,1207.6644,13.6719);
        SetPlayerCameraPos(playerid, 1555.392578, -1749.457031, 30.780603);
        SetPlayerCameraLookAt(playerid, 1504.327270, -1713.032226, 14.046875);
        return 0;
    }
    SetupPlayerForClassSelection(playerid);
    return 1;
}
But if i connect, i see the "<", ">" and "Spawn" buttons...
Any idea
Reply
#2

You can use this

pawn Код:
forward Spawn(playerid);

public OnPlayerRequestClass(playerid, classid)
{
    SetTimerEx("Spawn", 10, false, "i", playerid);
    return 1;
}

public Spawn(playerid)
{
    SpawnPlayer(playerid);
}
Reply
#3

Код:
public OnPlayerRequestClass(playerid, classid)
{
return 0;
}
Reply
#4

Thanx, but i solved with PlayerStateChange
Reply
#5

Hey, sorry for posting,
But I have a question: If you skip it, how does the server knows wich skin to choose for the player ?
Reply
#6

It will choose the first avaliable skin.
Reply
#7

Quote:
Originally Posted by Rickyboy30
Hey, sorry for posting,
But I have a question: If you skip it, how does the server knows wich skin to choose for the player ?
When connect a player, not need select a skin, only with /skinsel
Reply
#8

Quote:
Originally Posted by godknightx
Посмотреть сообщение
Thanx, but i solved with PlayerStateChange
This is WELL to late to post but, when you fix something it would be nice to paste your solution so other people can find out how to fix it themselves.
Reply
#9

I want it too.. What's the solution?
Reply
#10

I would say do something like this;
pawn Код:
public OnPlayerConnect(playerid)
{
     SetSpawnInfo(...); //Fill this in
     SpawnPlayer(playerid);
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)