Skin Selection
#1

Hello!I wanted to ask you how i can make that player can choose my skins when he chooses hes gender - onplayerrequestclass.

I already made gender selection.
Reply
#2

First of all make AddPlayerClass under OnGameModInit

pawn Код:
public OnGameModeInit()
{
 AddPlayerClass(2,1759.3490,-1895.4958,13.5610,268.6081,-1,-1,-1,-1,-1,-1);
 AddPlayerClass(269,1759.3490,-1895.4958,13.5610,268.6081,-1,-1,-1,-1,-1,-1);
 return 1;
}
after this

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetupPlayerForClassSelection(playerid);
    return 1;
}

forward SetupPlayerForClassSelection(playerid);
public SetupPlayerForClassSelection(playerid)
{
    SetPlayerInterior(playerid,14);
    SetPlayerFacingAngle(playerid, 270.0);
    PlayerPlaySound(playerid, 1186, 0.0, 0.0, 5.0);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
Reply
#3

I haven't tested it or anything, but maybe ..
pawn Код:
if(PlayerInfo[playerid][Gender] == Male)
{
AddPlayerClass( ...) etc?
I don't know if this works or anything but I think this can work.
Reply
#4

That wont work since you only can add classes add OnGameModeInit

The only way to do that is to recreate the class selection
As far as I know their is only y_classes which supports that
Reply
#5

Check if player male onplayerspawn showplayerdialog let him select the skin id then setplayerskin best way

Edit: clickable textdraws for skins would be better
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)