rep + dialog problem.
#1

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == russianbar)
    {
            if(response)
        {
                switch(listitem)
            {
                    case 0:
                {

                    if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -25);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+15);



                }
                case 1:
                {
                    if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -50);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+25);

                }
                case 2:
                {
                    if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -15);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+35);
                   

                }
                case 3:
                {
                    if(GetPlayerMoney(playerid) < 75) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -75);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+40);

                }
                case 4:
                {
                    if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -100);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+50);
                    }
                }
            }
           return 0;
    }
    if(dialogid == danielsbar)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {

                    if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -25);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+15);



                    }
                case 1:
                {
                    if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -50);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+25);

                    }
                case 2:
                {
                    if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -15);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+35);

                    }
                case 3:
                {
                    if(GetPlayerMoney(playerid) < 75) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -75);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+40);

                    }
                case 4:
                {
                    if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
                    GivePlayerMoney(playerid, -200);
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid,hp+50);


                    }
                }
            }
        }
    return 1;
}
wont compile it gives me an error loose indentation.

pawn Код:
ShowPlayerDialog(playerid, russianbar, DIALOG_STYLE_LIST, "Russian Menu","Sprunk ($25)\nVodka($50) \nBeer ($15)\nWine ($75) \nRedbull ($100)", "Purchase", "Cancel");
Reply


Messages In This Thread
rep + dialog problem. - by oscar7610 - 23.04.2012, 18:10
Re: rep + dialog problem. - by .FuneraL. - 23.04.2012, 18:19
Re: rep + dialog problem. - by ViniBorn - 23.04.2012, 18:19
Re: rep + dialog problem. - by Ballu Miaa - 23.04.2012, 18:22
Re: rep + dialog problem. - by kikito - 23.04.2012, 18:23
Re: rep + dialog problem. - by oscar7610 - 23.04.2012, 18:25
Re: rep + dialog problem. - by oscar7610 - 23.04.2012, 18:27
Re: rep + dialog problem. - by Calgon - 23.04.2012, 18:27
Re: rep + dialog problem. - by niels44 - 23.04.2012, 18:28
Re: rep + dialog problem. - by oscar7610 - 23.04.2012, 18:29

Forum Jump:


Users browsing this thread: 2 Guest(s)