skip request class
#1

I've read tons of these posts but all of them are out of date and do not work.
I just want to know how to skip the request class with the 2 arrows and spawn button.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=85836
Reply
#3

Quote:
Originally Posted by Jacapo
Посмотреть сообщение
I already read that , tried it. I couldnt spawn at all. stuck at class selection screen
Reply
#4

use these codes in OnPlayerRequestClass:

PHP код:
SetSpawnInfo
SpawnPlayer 
you can set the player pos at somewhere that you want and set player's virtual world to hide him
and set camera pos in every where you want
like in RP you can do that and then show player the Tutorial
Reply
#5

Try this:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetTimerEx("OnPlayerSpawn", 15, false, "i", playerid);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SpawnPlayer(playerid);
    printf("playerid %i skip the class selection..", playerid);
    return 1;
}
Reply
#6

Quote:
Originally Posted by Jacapo
Посмотреть сообщение
Try this:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetTimerEx("OnPlayerSpawn", 15, false, "i", playerid);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SpawnPlayer(playerid);
    printf("playerid %i skip the class selection..", playerid);
    return 1;
}
tried this and pawno closed out
If I have onplayerrequestclass return 1; on another filterscript would that be my problem?
Reply
#7

Swisher, there are many threads about it - toggling spectating mode to on will hide the buttons, then set the spawn info and spawn the player as amirab said.

Quote:
Originally Posted by Jacapo
Посмотреть сообщение
Try this:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetTimerEx("OnPlayerSpawn", 15, false, "i", playerid);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SpawnPlayer(playerid);
    printf("playerid %i skip the class selection..", playerid);
    return 1;
}
Do you realise that you've made a kind of infinite-loop? SpawnPlayer will spawn the player and OnPlayerSpawn callback will be called. It will then call SpawnPlayer again and the same thing..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)