Dialog not working
#1

When I type in the skin ID I want, nothing happens and no money is taken.

pawn Код:
CMD:clothes(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1,210.6381,-9.1441,1001.2109))
    {
        ShowPlayerDialog(playerid,24,1,"Clothes","Type in a skin ID below. (1-299)\nClothing cost $25!","Submit","Cancel");
    }
    return 1;
}
pawn Код:
if(dialogid==24)
{
    if(!response)
    if(response)
    {
        if(pInfo[playerid][Cash]>1)
        {
            new skin = strval(inputtext);
            if(skin < 1 || skin > 299) return ShowPlayerDialog(playerid,24,1,"Clothes","{FF6347}Invalid skin ID!\n{A9C4E4}Type in a skin ID below. (1-299)\nClothing cost $1!","Submit","Cancel");
            pInfo[playerid][Cash]--;
            GivePlayerMoney(playerid,-1);
            SetPlayerSkin(playerid,skin);
            pInfo[playerid][Skin]=skin;
        }
    }
    return 1;
}
Reply
#2

EDIT2: Oh, the 1 isn't the problem I see. Try to return 0 after if(!response):

pawn Код:
if(!response) return 0; // just returning 0 so the dialog dissapears
Reply
#3

Thanks, made a simple mistake
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)