Problema Dialog
#2

tenta agora xD

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new string[350];
    if(response)//they pressed the first button
    {
        switch(dialogid)
    {
        case 0:
        {
                if(PlayerInfo[playerid][pTraderPerk] > 0)
                {
                    new skill = 150 / 100;
                    new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
                    new payout = 150 - price;
                    format(string, sizeof(string), "~r~-$%d", payout);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    SafeGivePlayerMoney(playerid,- payout);
                    SBizzInfo[9][sbTill] += payout;
                    ExtortionSBiz(9, payout);
                }
                else
                {
                    format(string, sizeof(string), "~r~-$%d", 150);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    SafeGivePlayerMoney(playerid,-150);
                    SBizzInfo[9][sbTill] += 150;
                    ExtortionSBiz(9, 150);
                }
                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                new randphone = 100000 + random(899999);//minimum 1000  max 9999
                PlayerInfo[playerid][pPnumber] = randphone;
                format(string, sizeof(string), "Celular foi Comprado, o seu nъmero novo й %d", randphone);
                SendClientMessage(playerid, COLOR_GRAD4, string);
                SendClientMessage(playerid, COLOR_GRAD5, "Se vocк se esquecer, verifique em /stats");
                SendClientMessage(playerid, COLOR_WHITE, "DICA: Vocк pode digitar /help para ver os comandos do celular.");
                return 1;
            }
        case 1:
        {
                if(PlayerInfo[playerid][pTraderPerk] > 0)
                {
                    new skill = 10 / 100;
                    new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
                    new payout = 10 - price;
                    SafeGivePlayerMoney(playerid,- payout);
                    SBizzInfo[9][sbTill] += payout;
                    ExtortionSBiz(9, payout);
                    format(string, sizeof(string), "~r~-$%d", payout);
                    GameTextForPlayer(playerid, string, 5000, 1);
                }
                else
                {
                    SafeGivePlayerMoney(playerid,-10);
                    SBizzInfo[9][sbTill] += 10;
                    ExtortionSBiz(9, 10);
                    format(string, sizeof(string), "~r~-$%d", 10);
                    GameTextForPlayer(playerid, string, 5000, 1);
                }
                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                gDice[playerid] = 1;
                format(string, sizeof(string), "   Dice Purchased you can throw your Dice.");
                SendClientMessage(playerid, COLOR_GRAD4, string);
                SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /dice ");
               }
        case 2:
        {
                PlayerInfo[playerid][pFuel] = 20;
                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /fillup");
                GameTextForPlayer(playerid, "~r~-$20", 5000, 1);
                return 1;
                 }
       }
        return 0;
}
Reply


Messages In This Thread
Problema Dialog - by GuikBretas - 12.07.2010, 11:45
Re: Problema Dialog - by Mateus_Henrique - 12.07.2010, 12:00
Re: Problema Dialog - by [BEP]AcerPilot - 12.07.2010, 15:17
Re: Problema Dialog - by GuikBretas - 12.07.2010, 17:17
Re: Problema Dialog - by [BEP]AcerPilot - 12.07.2010, 20:21

Forum Jump:


Users browsing this thread: 4 Guest(s)