mSelection problem
#1

I make this skin selector, but i see only 20 skin (1/1 page)

On Top:
pawn Код:
#undef mS_CUSTOM_MAX_ITEMS
#define mS_CUSTOM_MAX_ITEMS         301
#define MS_SKIN_LIST                0
new skin[MAX_PLAYERS][300];
OnPlayerConnect:
pawn Код:
public OnPlayerConnect(playerid)
{    
    for(new i = 0; i <= 299; i++)
    {
        skin[playerid][i] = i;     
    }
    return 1;
}
ZCMD Command:
pawn Код:
CMD:skin(playerid, params[])
{
    ShowModelSelectionMenuEx(playerid, skin[playerid], 300, "Skin Selector", MS_SKIN_LIST, 0.0, 0.0, 0.0, 1.0);
    return 1;
}
OnPlayerModelSelectionEx:
pawn Код:
public OnPlayerModelSelectionEx(playerid, response, extraid, modelid)
{
    if(extraid == MS_SKIN_LIST)
    {
        if(response)
        {
            SetPlayerSkin(playerid, modelid);
            format(string1, sizeof(string1), "[INFO]: You have set skinid %d", modelid);
            SendClientMessage(playerid, YELLOW, string1);
        }
    }
    return 1;
}
Reply
#2

thsi one will work for sure ,i rebuilt it again

PHP код:
new skinlist mS_INVALID_LISTID
PHP код:

CMD
:skin(playeridparams[])
{
    
ShowModelSelectionMenu(playeridskinlist"Select Skin");
    return 
1;

PHP код:

public OnPlayerModelSelection(playeridresponselistidmodelid)
{
    if(
listid == skinlist)
    {
        if(
response)
        {
            new 
giveplayerid;
            
PlayerInfo[giveplayerid][pChar] = modelid;
            
PlayerInfo[giveplayerid][pModel] = modelid;            
                
SendClientMessage(playeridCOLOR_RED"Write here your text .. ");
            
SetPlayerSkin(giveplayeridPlayerInfo[giveplayerid][pChar]);
        }
        else 
SendClientMessage(playeridCOLOR_RED"You've choosed to leave that clothes shop");
        return 
1;
    }
    return 
1;
}
//----------------------------------------------------------------------------//
you can change the 
PlayerInfo
[giveplayerid][pChar]
PlayerInfo[giveplayerid][pmodelwith yours because i took it from my Gamemode 
PHP код:
    skinlist LoadModelSelectionMenu("PATH(scriptfiles)/skins.txt"); 
skins.txt http://pastebin.com/guq8xvC5
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)