Bypass class selection [instant spawn]
#1

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
Reply
#2

Try put it in OnPlayerConnect?
Reply
#3

Tried that, it still doesn't work
Reply
#4

You need to SetSpawnInfo under OnPlayerRequestClass

https://sampwiki.blast.hk/wiki/SetSpawnInfo
Reply
#5

Ignore this post :P
Reply
#6

If that doesn't work try returning 0 in OnPlayerRequestClass. Checkout barron.pwn, that has bypasses it.
Reply
#7

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetTimerEx("InstantSpawn", 200, 0, "i", playerid);
    return 1;
}

forward InstantSpawn(playerid);
public InstantSpawn(playerid)
{
    SpawnPlayer(playerid);
}
Reply
#8

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
Reply
#9

Ok, I've seen the example and understand now thanks everyone :P
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)