ForceClassSelection

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 12:51, 26 August 2015
OstGot (Talk | contribs)

← Previous diff
Revision as of 22:04, 8 February 2019
Freaksken (Talk | contribs)

Next diff →
Line 9: Line 9:
{{note2|The player will not return to class selection until they re-spawn. This can be achieved with [[TogglePlayerSpectating]], as seen in the below example.}} {{note2|The player will not return to class selection until they re-spawn. This can be achieved with [[TogglePlayerSpectating]], as seen in the below example.}}
 +
 +{{note2|This function does not perform a [[OnPlayerStateChange|state change]] to PLAYER_STATE_WASTED, as is listed [[State|here]].}}
<pawn> <pawn>

Revision as of 22:04, 8 February 2019



Description:

Forces a player to go back to class selection.


Parameters:
(playerid)
playeridThe player to send back to class selection.


Return Values:

This function does not return any specific values.


Image:32px-Circle-style-warning.png

Important
Note

The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating, as seen in the below example.


Image:32px-Circle-style-warning.png

Important
Note

This function does not perform a state change to PLAYER_STATE_WASTED, as is listed here.


if(!strcmp(cmdtext, "/class", true))
{
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, true);
    TogglePlayerSpectating(playerid, false);
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.


Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools
In other languages