OnPlayerRequestClass

From SA-MP Wiki

Jump to: navigation, search

OnPlayerRequestClass


Called when a player changes class at class selection.


Parameters:
(playerid, classid)
playeridThe ID of the player that changes class.
classidThe ID of the current class being viewed.


This callback does not handle returns.


Note: Class IDs are assigned when AddPlayerClass is used.


Note: This callback is also called when a player presses F4


public OnPlayerRequestClass(playerid,classid)
{
    if(classid == 3 && !IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_GREEN,"This skin is only for admins!");
    }
    return 1;
}

Related Callbacks

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


Related Functions

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

Personal tools