SA-MP Forums Archive
onplayerrequestspawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: onplayerrequestspawn (/showthread.php?tid=421219)



onplayerrequestspawn - megamind2067 - 08.03.2013

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




Re: onplayerrequestspawn - PabloDiCostanzo - 08.03.2013

I think is automatcally


Re: onplayerrequestspawn - Gingster - 08.03.2013

I think this will work.
Quote:

public OnPlayerConnect(playerid)
{

ViewingTextDraws[playerid] = 1;

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

return 1;
}



Re: onplayerrequestspawn - absolute - 08.03.2013

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


Re: onplayerrequestspawn - megamind2067 - 08.03.2013

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


Re: onplayerrequestspawn - LarzI - 08.03.2013

You need to skip OnPlayerRequestClass and use SetSpawnInfo + SpawnPlayer


Re: onplayerrequestspawn - FUNExtreme - 08.03.2013

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


Re: onplayerrequestspawn - Threshold - 09.03.2013

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.