Class Specific Skins
#1

How do I make it so that only certain classes/professions can choose certain skins and block regular players from using them.

I would prefer to have skins that are unavailable to the player to be hidden if possible.
Reply
#2

pawn Код:
new
    adminSkin
;

public OnGameModeInit( )
{
    AddPlayerClass( 0, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, -1, -1, -1 ); // Regular player skin
    adminSkin = AddPlayerClass( 250, 0.0, 0.0, 0.0, 0.0, -1, -1, -1, -1, -1, -1 ); // Administrator's Skin
}

new
    isDenied[ MAX_PLAYERS ]
;

public OnPlayerRequestClass( playerid, classid )
{
    if ( classid == adminSkin && !IsPlayerAdmin( playerid ) ) {
        isDenied[ playerid ] =  1; GameTextForPlayer( playerid, "~w~Restricted skin ", 1000, 3 );
    }

    else
        isDenied[ playerid ] = 0;

    return 1;
}

 
public OnPlayerRequestSpawn( playerid )
{
    if ( isDenied[ playerid ] == 1 ) {
        SendClientMessage( playerid, -1, "RESTRICTED SKIN" );
        return 0;
    }
    return 1;
}
Quote:

I would prefer to have skins that are unavailable to the player to be hidden if possible.

Hmm, I don't know about that one, but maybe ******'s Server Includes ( which have a custom player class adding ) may help you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)