onplayerrequestspawn
#1

How to i get rid of what I circled in RED?

Reply
#2

I think is automatcally
Reply
#3

I think this will work.
Quote:

public OnPlayerConnect(playerid)
{

ViewingTextDraws[playerid] = 1;

}
public OnPlayerRequestSpawn(playerid)
{
if(ViewingTextDraws[playerid] == 1) return 0;

return 1;
}
Reply
#4

try to hide the textdraws on OnPlayerRequestClass... if that doesn't work... then there is no way i think
Reply
#5

Quote:
Originally Posted by Gingster
Посмотреть сообщение
I think this will work.
it doesn't i don't even got the enums for that
Reply
#6

You need to skip OnPlayerRequestClass and use SetSpawnInfo + SpawnPlayer
Reply
#7

They are hidden when you set the player as spectating. But I assume that won't be useful in this case
Reply
#8

Example:
pawn Код:
new HasChosenClass[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    HasChosenClass[playerid] = 0;
    TogglePlayerSpectating(playerid, 1);
    //Do your little cutscene thing here
    //You might have a SetTimerEx here for when the cutscene ends
    return 1;
}

//When cutscene ends...
    TogglePlayerSpectating(playerid, 0); //OnPlayerSpawn is called.
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(HasChosenClass[playerid] == 0)
    {
        HasChosenClass[playerid] = 1;
        ForceClassSelection(playerid);
        TogglePlayerSpectating(playerid, true);
        TogglePlayerSpectating(playerid, false);
    }
    return 1;
}
Hopefully this works for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)