How To Skip Class Selection?
#1

hello, having a bit of trouble here. I simply want it to spawn players immediately as they connect, and it keeps passing me to the class selection screen.

maybe someone here already knows how to do this and can help me out.

ive tried SpawnPlayer(playerid); in OnPlayerConnect, OnPlayerClassSelection, it will not get me out of it, it still shows the SAMP logo and the class selection info under it.
Reply
#2

Quote:
Originally Posted by enum djlobo
Quote:
Originally Posted by happyface
hello, having a bit of trouble here. I simply want it to spawn players immediately as they connect, and it keeps passing me to the class selection screen.

maybe someone here already knows how to do this and can help me out.

ive tried SpawnPlayer(playerid); in OnPlayerConnect, OnPlayerClassSelection, it will not get me out of it, it still shows the SAMP logo and the class selection info under it.
remove OnPlayerRequestClass(playerid, classid) but you might use setplayerpos*(maybe with a random spawns) in onplayerconnect
i forgot to mention, i have tried removing OnPlayerRequestClass, and i've tried setting POS in OnPlayerSpawn, OnPlayerConnect, and OnPlayerRequestClass, i've tried anything i could think of, different variations.
Reply
#3

almost the same thing everytime, it always starts with class selection, the only thing i ever noticed changing all this is that the arrow keys spawn the player auto in the class selection, which does not help.

sorry if im being kind of vague, its one of those deals where you spend an hour messing around with something, trying anything you can think of with no success. kind of forgot everything i have tried.

for example right now i have

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    SpawnPlayer(playerid);
    return 1;
}
pawn Code:
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, 2480.2788,41.7482,26.4844);
    SetPlayerCameraPos(playerid, 2466.5422,41.7482,27.3437);
    SetPlayerCameraLookAt(playerid, 2386.2788,41.7482,26.4844);
    TogglePlayerControllable(playerid, 0);
    return 1;
}
and it starts you at the class selection menu with the vinewood backdrop.

then, i tried deleting the above OnPlayerRequestClass, and leaving everything else, and I get the same results.

now i try

pawn Code:
public OnPlayerConnect(playerid)
{
    SpawnPlayer(playerid);
    return 1;
}
pawn Code:
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, 2480.2788,41.7482,26.4844);
    SetPlayerCameraPos(playerid, 2466.5422,41.7482,27.3437);
    SetPlayerCameraLookAt(playerid, 2386.2788,41.7482,26.4844);
    TogglePlayerControllable(playerid, 0);
    return 1;
}
same results

i just also tried just OnPlayerConnect, with and without this SpawnPlayer
pawn Code:
public OnPlayerConnect(playerid)
{
    SpawnPlayer(playerid);
    SetPlayerPos(playerid, 2480.2788,41.7482,26.4844);
    SetPlayerCameraPos(playerid, 2466.5422,41.7482,27.3437);
    SetPlayerCameraLookAt(playerid, 2386.2788,41.7482,26.4844);
    TogglePlayerControllable(playerid, 0);
    return 1;
}

Reply
#4

Code:
public OnPlayerRequestClass(playerid, classid)
{
  return 0;
}
This might work as it returns 0
Reply
#5

Quote:
Originally Posted by ruarai
Code:
public OnPlayerRequestClass(playerid, classid)
{
  return 0;
}
This might work as it returns 0
wonderful! great thinking.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)