Problem with dialog.
#2

pawn Код:
if(dialogid == 40)
    {
        if(!response)
        {
        } else {
        switch(listitem)
        {
            case 0:
            {
                new string[128];
                if(server_GetCash(playerid) >= 5)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You've purchased a sprunk!");
                    server_GiveCash(playerid, -5);
                    PlayerInfo[playerid][pSprunk]= PlayerInfo[playerid][pSprunk]+1;
                    GameTextForPlayer(playerid, "~r~$-5", 1000,1);
                    format(string, sizeof(string), "* %s has bought a sprunk for $5.", GetName(playerid));
                    ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                else
                {
                SendClientMessage(playerid, COLOR_RED, "Not enough money!");
                }
            }
     }
This should work..

EDIT: Make sure to fix the identation

EDIT:
pawn Код:
if(dialogid == 40)
    {
        if(!response)
        {
               return 0;
        }
        switch(listitem)
        {
            case 0:
            {
                new string[128];
                if(server_GetCash(playerid) >= 5)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You've purchased a sprunk!");
                    server_GiveCash(playerid, -5);
                    PlayerInfo[playerid][pSprunk]= PlayerInfo[playerid][pSprunk]+1;
                    GameTextForPlayer(playerid, "~r~$-5", 1000,1);
                    format(string, sizeof(string), "* %s has bought a sprunk for $5.", GetName(playerid));
                    ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                else
                {
                SendClientMessage(playerid, COLOR_RED, "Not enough money!");
                }
            }
I think this could work too..
Reply


Messages In This Thread
Problem with dialog. - by lQs - 02.05.2013, 23:44
Re: Problem with dialog. - by JackBurgani - 02.05.2013, 23:51
Re: Problem with dialog. - by lQs - 02.05.2013, 23:56
Re: Problem with dialog. - by Pottus - 03.05.2013, 00:03
Re: Problem with dialog. - by JackBurgani - 03.05.2013, 00:04
Re: Problem with dialog. - by JackBurgani - 03.05.2013, 00:06

Forum Jump:


Users browsing this thread: 1 Guest(s)