[DUV] Alguem me ajuda fazer dialog ligar
#3

No top Add isso
pawn Код:
enum ChefaoInfo
{
    Tels[256],
};
Em baixo de Enum ChefaoInfo coloque:
pawn Код:
new PoderosoInfo[MAX_PLAYERS][ChefaoInfo];
No top add
pawn Код:
enum pInfo
{  
pPhoneBook,
};





em public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

Add Isso
pawn Код:
if(dialogid == 3)
        {
            if(response == 0)
            {
                PoderosoInfo[playerid][Tels] = 0;
                return 1;
            }
            if(response >= 1)
            {
                if(listitem == 0)
                {
                    if (PlayerInfo[playerid][pPhoneBook] == 1)
                    {
                        format(string,sizeof(string),"/ligar %d",PoderosoInfo[playerid][Tels]);
                        OnPlayerCommandText(playerid,string);
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo tem lista telefфnica !");
                        return 1;
                    }
                }
                if(listitem == 1)
                {
                    if (PlayerInfo[playerid][pPhoneBook] == 1)
                    {
                        ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "Menu de SMS", "Digite a Mensage", "Enviar", "Cancelar");
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo tem lista telefфnica !");
                        return 1;
                    }
                }
                return 1;
            }
            return 1;
        }
        if(dialogid == 4)
        {
            if(response == 0)
            {
                PoderosoInfo[playerid][Tels] = 0;
                return 1;
            }
            if(response >= 1)
            {
                format(string,sizeof(string),"/sms %d %s",PoderosoInfo[playerid][Tels],inputtext);
                OnPlayerCommandText(playerid,string);
                return 1;
            }
            return 1;
        }

no final do gm add isso:
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    new string[256];
    new pstring[256];
    new plname[MAX_PLAYER_NAME];
    PoderosoInfo[playerid][Tels] = 0;
    GetPlayerName(clickedplayerid, plname, sizeof(plname));
    format(string, sizeof(string), "Menu do(a) %s", plname);
    format(pstring, sizeof(pstring), "Ligar para %s\nMandar SMS para %s", plname,plname);
    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, string, pstring, "Confirmar", "Cancelar");
    PoderosoInfo[playerid][Tels] = PlayerInfo[clickedplayerid][pPnumber];
    return 1;
}
Reply


Messages In This Thread
[DUV] Alguem me ajuda fazer dialog ligar - by Lucca_dias - 12.07.2010, 16:43
Re: [DUV] Alguem me ajuda fazer dialog ligar - by [BEP]AcerPilot - 12.07.2010, 16:48
Re: [DUV] Alguem me ajuda fazer dialog ligar - by Mateus_Henrique - 12.07.2010, 16:52
Re: [DUV] Alguem me ajuda fazer dialog ligar - by [BEP]AcerPilot - 12.07.2010, 17:06
Re: [DUV] Alguem me ajuda fazer dialog ligar - by Lucca_dias - 12.07.2010, 18:04
Re: [DUV] Alguem me ajuda fazer dialog ligar - by Data_Base - 12.07.2010, 18:17
Re: [DUV] Alguem me ajuda fazer dialog ligar - by Mateus_Henrique - 12.07.2010, 18:38
Re: [DUV] Alguem me ajuda fazer dialog ligar - by Lucca_dias - 12.07.2010, 20:00
Re: [DUV] Alguem me ajuda fazer dialog ligar - by Data_Base - 12.07.2010, 20:12
Re: [DUV] Alguem me ajuda fazer dialog ligar - by Lucca_dias - 12.07.2010, 20:25

Forum Jump:


Users browsing this thread: 1 Guest(s)