[HELP] Skip Class Selection - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Skip Class Selection (
/showthread.php?tid=107129)
[HELP] Skip Class Selection -
cAMo - 08.11.2009
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.
Re: [HELP] Skip Class Selection -
Hiddos - 08.11.2009
pawn Код:
public OnPlayerConnect(playerid)
{
SpawnPlayer(playerid);
return 0;
}
Re: [HELP] Skip Class Selection -
Sergei - 08.11.2009
Put player in spectation mode under OnPlayerRequestClass and then do what you want.
Re: [HELP] Skip Class Selection -
AG Adam - 08.11.2009
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
Re: [HELP] Skip Class Selection -
Joe Staff - 09.11.2009
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.
Re: [HELP] Skip Class Selection -
Danny_Costelo - 09.11.2009
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?
Re: [HELP] Skip Class Selection -
Think - 09.11.2009
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 ^^
Re: [HELP] Skip Class Selection -
Joe Staff - 09.11.2009
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;
}