onplayerrequestspawn
#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


Messages In This Thread
onplayerrequestspawn - by megamind2067 - 08.03.2013, 18:17
Re: onplayerrequestspawn - by PabloDiCostanzo - 08.03.2013, 18:18
Re: onplayerrequestspawn - by Gingster - 08.03.2013, 18:25
Re: onplayerrequestspawn - by absolute - 08.03.2013, 18:31
Re: onplayerrequestspawn - by megamind2067 - 08.03.2013, 19:10
Re: onplayerrequestspawn - by LarzI - 08.03.2013, 19:20
Re: onplayerrequestspawn - by FUNExtreme - 08.03.2013, 22:23
Re: onplayerrequestspawn - by Threshold - 09.03.2013, 00:48

Forum Jump:


Users browsing this thread: 1 Guest(s)