Dialog not working...
#4

Return your dialog..

pawn Код:
if(dialogid == 60)
        {
            if(response)
            {
                if (listitem == 0)
                {
                    if(GetPlayerMoney(playerid) < 500)
                    {
                        SCM(playerid,COLOR_RED,"You dont have enough money to buy this!");
                    }
                    else
                    {
                        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                        new randphone = 1000 + random(8999);//minimum 1000  max 9999
                        AccountInfo[playerid][pPnumber] = randphone;
                        GivePlayerMoney(playerid,-500);
                        format(string, sizeof(string), "Mobile Phone purchased your new number is %d", randphone);
                        SendClientMessage(playerid, COLOR_GREEN, string);
                        OnPlayerUpdateAccount(playerid);
                    }
                }
                else if (listitem == 1)
                {
                    if(GetPlayerMoney(playerid) < 100)
                    {
                        SCM(playerid,COLOR_RED,"You dont have enough money to buy this!");
                    }
                    else
                    {
                        AccountInfo[playerid][pSeeds] = 5;
                        GivePlayerMoney(playerid,-100);
                        SCM(playerid,COLOR_GREEN,"You bought 5 seeds!");
                        OnPlayerUpdateAccount(playerid);
                    }
                }
                else if (listitem == 2)
                {
                    if(GetPlayerMoney(playerid) < 25)
                    {
                        SCM(playerid,COLOR_RED,"You dont have enough money to buy this!");
                    }
                    else
                    {
                        GivePlayerMoney(playerid,-25);
                        SCM(playerid,COLOR_GREEN,"You bought a cigarette!");
                        SetPlayerSpecialAction(playerid,21);
                    }
                }
                else if (listitem == 3)
                {
                    if(GetPlayerMoney(playerid) < 15)
                    {
                        SCM(playerid,COLOR_RED,"You dont have enough money to buy this!");
                    }
                    else
                    {
                        GivePlayerMoney(playerid,-15);
                        SCM(playerid,COLOR_GREEN,"You bought a bottle of beer!");
                        SetPlayerSpecialAction(playerid,20);
                    }
                }
                else if (listitem == 4)
                {
                    if(GetPlayerMoney(playerid) < 1000)
                    {
                        SCM(playerid,COLOR_RED,"You dont have enough money to buy this!");
                    }
                    else
                    {
                        AccountInfo[playerid][pCB] = 1;
                        GivePlayerMoney(playerid,-1000);
                        SCM(playerid,COLOR_GREEN,"You bought a CB Radio! (/joinchannel , /cb )");
                        OnPlayerUpdateAccount(playerid);
                    }
                }
                else if (listitem == 5)
                {
                    SCM(playerid,COLOR_RED,"Sorry we are out of stock with phone books, come back later!");
                }
                else if (listitem == 6)
                {
                    if(GetPlayerMoney(playerid) < 100)
                    {
                        SCM(playerid,COLOR_RED,"You dont have enough money to buy this!");
                    }
                    else
                    {
                        SetPlayerHealth(playerid,100);
                        SCM(playerid,COLOR_GREEN,"You ate some tacos!");
                    }
                }
                else if (listitem == 7)
                {
                    if(GetPlayerMoney(playerid) < 100)
                    {
                        SCM(playerid,COLOR_RED,"You dont have enough money to buy this!");
                    }
                    else
                    {
                        GivePlayerWeapon(playerid,46,1);
                        SCM(playerid,COLOR_GREEN,"You bought a parachute!");
                    }
                }
            }
            return 1;
        }
Reply


Messages In This Thread
Dialog not working... - by McCarthy - 26.11.2011, 15:28
Re: Dialog not working... - by Mr_Scripter - 26.11.2011, 15:30
Re: Dialog not working... - by McCarthy - 26.11.2011, 15:32
Re: Dialog not working... - by Joshb93 - 26.11.2011, 15:33
Re: Dialog not working... - by McCarthy - 26.11.2011, 15:44
Re: Dialog not working... - by Chris White - 26.11.2011, 15:52
Re: Dialog not working... - by McCarthy - 27.11.2011, 13:08
Re: Dialog not working... - by Tanush123 - 27.11.2011, 13:35
Re: Dialog not working... - by Kostas' - 27.11.2011, 13:44

Forum Jump:


Users browsing this thread: 1 Guest(s)