Bypass class selection [instant spawn] -
[HLF]Southclaw - 22.03.2010
I'm sure this has been asked a load of times before, I have searched and couldn't find anything.
All I want is so when a player connects, they are instantly spawned
I added SpawnPlayer on OnPlayerRequestClass but I know that won't work because that is called when the player presses left and right keys rather than when they enter the class selection
Thanks
Re: Bypass class selection [instant spawn] -
Torran - 22.03.2010
Try put it in OnPlayerConnect?
Re: Bypass class selection [instant spawn] -
[HLF]Southclaw - 22.03.2010
Tried that, it still doesn't work
Re: Bypass class selection [instant spawn] -
Outbreak - 22.03.2010
You need to SetSpawnInfo under OnPlayerRequestClass
https://sampwiki.blast.hk/wiki/SetSpawnInfo
Re: Bypass class selection [instant spawn] -
Torran - 22.03.2010
Ignore this post :P
Re: Bypass class selection [instant spawn] -
Jay_ - 22.03.2010
If that doesn't work try returning 0 in OnPlayerRequestClass. Checkout barron.pwn, that has bypasses it.
Re: Bypass class selection [instant spawn] -
MadeMan - 22.03.2010
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetTimerEx("InstantSpawn", 200, 0, "i", playerid);
return 1;
}
forward InstantSpawn(playerid);
public InstantSpawn(playerid)
{
SpawnPlayer(playerid);
}
Re: Bypass class selection [instant spawn] -
Outbreak - 22.03.2010
Quote:
Originally Posted by MadeMan
pawn Код:
public OnPlayerRequestClass(playerid, classid) { SetTimerEx("InstantSpawn", 200, 0, "i", playerid); return 1; }
forward InstantSpawn(playerid); public InstantSpawn(playerid) { SpawnPlayer(playerid); }
|
Why would you use a timer when there is absolutly no need at all?
I've already given him info on how to do it. If you click the link i gave him, it even gives an example of bypassing it, no return value needed.
https://sampwiki.blast.hk/wiki/SetSpawnInfo
Re: Bypass class selection [instant spawn] -
[HLF]Southclaw - 23.03.2010
Ok, I've seen the example and understand now
thanks everyone :P
Re: Bypass class selection [instant spawn] -
MadeMan - 23.03.2010
Quote:
Originally Posted by Outbreak
Why would you use a timer when there is absolutly no need at all?
I've already given him info on how to do it. If you click the link i gave him, it even gives an example of bypassing it, no return value needed.
https://sampwiki.blast.hk/wiki/SetSpawnInfo
|
It doesn't work for me. I still have to press Spawn button to spawn.