[HELP] Skip Class Selection
#1

How do you skip class selection in .3?

I have a login script executed in OnPlayerConnect.

I also have OnPlayerRequestClass setup like this:
Код:
public OnPlayerRequestClass(playerid, classid)
{
	return 0;
}
Once I login, it brings up the arrows and spawn gui (unique in .3). The spawn button doesn't do anything. However, I can't figure out how to spawn the player.

** I don't want the arrows and spawn buttons to do anything or even come up at all. I just want to spawn the player.
Reply
#2

pawn Код:
public OnPlayerConnect(playerid)
{
     SpawnPlayer(playerid);
     return 0;
}
Reply
#3

Put player in spectation mode under OnPlayerRequestClass and then do what you want.
Reply
#4

I think:
  • Check the player is logged in under OnPlayerRequestClass
  • If logged in, set the camera's position* to don't see the player, set a timer to spawn the player (ex.:3 sec), create a textdraw hiding the buttons
  • Spawn the player with the timer
* Set the camera's position to don't see the player
Reply
#5

Here's what I've always done
pawn Код:
forward SkipSpawn(playerid);
public OnPlayerRequestClass(playerid)
{
  SetTimerEx("SkipSpawn",0,1,"i",playerid);//It's required to have atleast 1 millisecond
  return 1;
}
public SkipSpawn(playerid)
{
  //Set Spawn Information Here Using SpawnInfo(...);
  SpawnPlayer(playerid);
  return 1;
}
And it works on my current script.
Reply
#6

Quote:
Originally Posted by Joe Staff
Here's what I've always done
pawn Код:
forward SkipSpawn(playerid);
public OnPlayerRequestClass(playerid)
{
  SetTimerEx("SkipSpawn",0,1,"i",playerid);//It's required to have atleast 1 millisecond
  return 1;
}
public SkipSpawn(playerid)
{
  //Set Spawn Information Here Using SpawnInfo(...);
  SpawnPlayer(playerid);
  return 1;
}
Why are you repeating the timer loop?
Reply
#7

Quote:
Originally Posted by Joe Staff
Here's what I've always done
pawn Код:
forward SkipSpawn(playerid);
public OnPlayerRequestClass(playerid)
{
  SetTimerEx("SkipSpawn",0,1,"i",playerid);//It's required to have atleast 1 millisecond
  return 1;
}
public SkipSpawn(playerid)
{
  //Set Spawn Information Here Using SpawnInfo(...);
  SpawnPlayer(playerid);
  return 1;
}
And it works on my current script.
Your current script must be bugged up by now then ^^
Reply
#8

lol, I switched the 1 and the 0, my bad.

pawn Код:
forward SkipSpawn(playerid);
public OnPlayerRequestClass(playerid)
{
  SetTimerEx("SkipSpawn",1,0,"i",playerid);//It's required to have atleast 1 millisecond
  return 1;
}
public SkipSpawn(playerid)
{
  //Set Spawn Information Here Using SpawnInfo(...);
  SpawnPlayer(playerid);
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)