How to spawn player without going to class selection
#1

Hello Everybody,

I am using shoebill (Pawn API for java development). How can i directly spawn the player after him logging in through the dialog by skipping the class selection as well. You can provide me with the PAWN code as well. Maybe I can easily translate the code.

I have used setSpawnInfo and spawnplayer directly after dialog response. But it goes to the class selection still.

Thanks
Reply
#2

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SpawnPlayer(playerid);
    return 
1;

https://sampwiki.blast.hk/wiki/SpawnPlayer
Reply
#3

Isnt the requestclass event only for when you press the 'spawn' button
Reply
#4

Quote:
Originally Posted by MrViolence101
Посмотреть сообщение
Isnt the requestclass event only for when you press the 'spawn' button
This for OnPlayerRequestSpawn.
Reply
#5

Quote:
Originally Posted by oMa37
Посмотреть сообщение
This for OnPlayerRequestSpawn.
After I have logged in it shows me in spectating mode with the spawn buttons. When i click spawn it spawns me. I want to spawn directly after i've logged in.
Reply
#6

When the player logins successfully, use SetSpawnInfo and SpawnPlayer.
Reply
#7

Try this, if not working, try using SetSpawnInfo when player login and spawn him OnPlayerRequestClass.

PHP код:
// OnPlayerConnect
TogglePlayerSpectating(playeridtrue);
// OnPlayerRequestClass
SpawnPlayer(playerid);
// Login/Register Dialogs
TogglePlayerSpectating(playeridfalse); 
EDIT; Kosta got it first ;c
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)