Help with dialog
#2

pawn Код:
if(dialogid == 6)
{
    if(response)
    {
        if(listitem == 0)
        {
            if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, red, "You need $100 to buy a snack.");
            {
                if(Snack[playerid] == 1) return SendClientMessage(playerid, red, "You already have a snack.");
                {
                    SendClientMessage(playerid, green, "You have bought a snack. Use /eatsnack to use it at any time.");
                    Snack[playerid] = 1;
                    GivePlayerMoney(playerid, -100);
                    GetPlayerName(playerid, pname, 24);
                    format(file, sizeof(file), USER_FILES, pname);
                    if(!dini_Exists(file))
                    {
                        dini_Create(file);
                        dini_IntSet(file, "Snack", Snack[playerid]);

                    }
                }
            }
        }
    }
}
Reply


Messages In This Thread
Help with dialog - by zack3021 - 07.11.2010, 23:08
Re: Help with dialog - by The_Moddler - 07.11.2010, 23:14
Re: Help with dialog - by zack3021 - 07.11.2010, 23:31

Forum Jump:


Users browsing this thread: 1 Guest(s)