lol, theres nothing happen OnDialogReponse
#5

Check the dialogid either with switch (recommended) or with if/else if statement. It's kind of pointless to check if the dialog is equal to DIALOG_FAM_TOKEN and theck checking again if the dialogid is 1.

All your scripts that use OnDialogResponse callback must return 0 at the end of it.

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case DIALOG_FAM_TOKEN:
        {
            if (response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        if (FamilyInfo[playerid][FamilyTurfTokens] < 3) return SendClientMessage(playerid, COLOR_GRAD1, "You dont have 3 token to buy that!");
                        GivePlayerValidWeapon(playerid, 26, 999999999);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have buy sawn-off shotgun for 3 tokens!");
                        FamilyInfo[playerid][FamilyTurfTokens] -=3;
                    }
                }
            }
        }
    }
    return 0;
}
Reply


Messages In This Thread
lol, theres nothing happen OnDialogReponse - by Trynda - 08.05.2014, 14:19
Re: lol, theres nothing happen OnDialogReponse - by AndySedeyn - 08.05.2014, 14:22
Re: lol, theres nothing happen OnDialogReponse - by Trynda - 08.05.2014, 14:23
Re: lol, theres nothing happen OnDialogReponse - by AndySedeyn - 08.05.2014, 14:25
Re: lol, theres nothing happen OnDialogReponse - by Konstantinos - 08.05.2014, 14:28
Re: lol, theres nothing happen OnDialogReponse - by Trynda - 08.05.2014, 14:45

Forum Jump:


Users browsing this thread: 2 Guest(s)