PDA

View Full Version : Bypass class selection [instant spawn]


[HLF]Southclaw
22/03/2010, 12:41 PM
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 :D

Torran
22/03/2010, 12:43 PM
Try put it in OnPlayerConnect?

[HLF]Southclaw
22/03/2010, 12:44 PM
Tried that, it still doesn't work

Outbreak
22/03/2010, 12:52 PM
You need to SetSpawnInfo under OnPlayerRequestClass

http://wiki.sa-mp.com/wiki/SetSpawnInfo

Torran
22/03/2010, 01:24 PM
Ignore this post :P

Jay_
22/03/2010, 01:53 PM
If that doesn't work try returning 0 in OnPlayerRequestClass. Checkout barron.pwn, that has bypasses it.

MadeMan
22/03/2010, 02:26 PM
public OnPlayerRequestClass(playerid, classid)
{
SetTimerEx("InstantSpawn", 200, 0, "i", playerid);
return 1;
}

forward InstantSpawn(playerid);
public InstantSpawn(playerid)
{
SpawnPlayer(playerid);
}

Outbreak
22/03/2010, 11:05 PM
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.

http://wiki.sa-mp.com/wiki/SetSpawnInfo

[HLF]Southclaw
23/03/2010, 08:17 AM
Ok, I've seen the example and understand now :D thanks everyone :P

MadeMan
23/03/2010, 09:28 AM
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.

http://wiki.sa-mp.com/wiki/SetSpawnInfo


It doesn't work for me. I still have to press Spawn button to spawn.

Simon
23/03/2010, 09:34 AM
Did you use SetSpawnInfo THEN SpawnPlayer? That's what you should do.

MadeMan
23/03/2010, 09:38 AM
Did you use SetSpawnInfo THEN SpawnPlayer? That's what you should do.


I didn't use SpawnPlayer at all :D

Works now, thx.

[FSaF]Jarno
30/04/2012, 12:37 PM
Oh, i totally forgot about SetSpawnInfo :D