ShowModelSelectionMenu CRASH
#1

Okay so, i'm trying to script a re-script my clothing shop system. All I was that I replaced the dialog that shows up on /buyclothes with the code below(of course i've placed the code onto the correct places):
pawn Код:
#include <mSelection>

new skinlist = mS_INVALID_LISTID;

OnGameModeInit(){
        skinlist = LoadModelSelectionMenu("skins.txt");
}

CMD:buyclothes(playerid, params[])
{
    if(IsAtClothShop(playerid))
    {
        ShowModelSelectionMenu(playerid, skinlist, "Select Skin");
    }
    else
    {
        SendClientMessage( playerid, COLOR_WHITE, "You are not in a Clothing Store!" );
    }
    return 1;
}

public OnPlayerModelSelection(playerid, response, listid, modelid)
{
    if(listid == skinlist)
    {
        if(response)
        {
            new string[128];
            format(string, sizeof(string), "** You have purchased skinid: %i for $600", modelid);
            SendClientMessageEx(playerid, 0xFF0000FF, string);
            SetPlayerSkin(playerid, modelid);
            GivePlayerCash(playerid, -600);
            PlayerInfo[playerid][pModel] = modelid;
        }
        else SendClientMessage(playerid, 0xFF0000FF, "Canceled skin selection");
        return 1;
    }
    return 1;
}
and here is my skins.txt: Pastebin
Firstly it said that "mS_CUSTOM_MAX_ITEMS" had to be increased, good I increased them to 300 but still, when i type the command i crash.
Reply


Messages In This Thread
ShowModelSelectionMenu CRASH - by ZackBoolaro - 01.04.2013, 02:16
Re: ShowModelSelectionMenu CRASH - by Pawnie - 01.04.2013, 02:18
Re: ShowModelSelectionMenu CRASH - by ZackBoolaro - 01.04.2013, 02:38
Re: ShowModelSelectionMenu CRASH - by Azazelo - 01.04.2013, 03:00
Re: ShowModelSelectionMenu CRASH - by ZackBoolaro - 01.04.2013, 03:05
Re: ShowModelSelectionMenu CRASH - by Azazelo - 01.04.2013, 03:07
Re: ShowModelSelectionMenu CRASH - by ZackBoolaro - 01.04.2013, 03:09
Re: ShowModelSelectionMenu CRASH - by Azazelo - 01.04.2013, 03:13
Re: ShowModelSelectionMenu CRASH - by ZackBoolaro - 01.04.2013, 03:20
Re: ShowModelSelectionMenu CRASH - by Azazelo - 01.04.2013, 03:26

Forum Jump:


Users browsing this thread: 1 Guest(s)