SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

Participe do fórum, é rápido e fácil

SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

SSGamers - 12 Anos online por você.

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Chegou o novo tema 6.5.5 - SSGamers - Servidores online de qualidade - Aproveite e entre para nossa comunidade, inscreva-se já! - Ouça nossa web radio - Veja nossas novidades - Participe dos nossos setores de jogos online - Parcerias aberta fale já com um administrador.

2 participantes

    ShowPlayerDialog

    Weslley_Script
    Weslley_Script
    SS - Fundador
    SS - Fundador


    Steam Steam : WeslleySSGames
    Zello : WeslleySSGames
    Mensagens : 11378
    Moedas : 1031978
    Data de inscrição : 06/10/2011
    Idade : 28
    Localização : Brasil

    ShowPlayerDialog Empty ShowPlayerDialog

    Mensagem por Weslley_Script Sáb 25 Mar 2023 - 10:53

    Description:
    Shows the player a synchronous (only one at a time) dialog box.

    Parameters:
    (playerid, dialogid, style, caption[], info[], button1[], button2[])
    playerid The ID of the player to show the dialog to.
    dialogid An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog.
    style The style of the dialog.
    caption[] The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off.
    info[] The text to display in the main dialog. Use \n to start a new line and \t to tabulate.
    button1[] The text on the left button.
    button2[] The text on the right button. Leave it blank ( "" ) to hide it.

    Return Values:
    1: The function executed successfully.
    0: The function failed to execute. This means the player is not connected.


    Código:
    // Define the dialog IDs either with an enum:


    enum


    {


        DIALOG_LOGIN,


        DIALOG_WELCOME,


        DIALOG_WEAPONS


    }


     


    // Alternatively, using macros:


    #define DIALOG_LOGIN 1


    #define DIALOG_WELCOME 2


    #define DIALOG_WEAPONS 3


     


    // Enums are recommended, as you don't have to keep track of used IDs. However, enums use memory to store the defines, whereas defines are processed in the 'pre-processor' (compiling) stage.


     


    // Example for DIALOG_STYLE_MSGBOX:


    ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You are connected to the server", "Close", "");


     


    // Example for DIALOG_STYLE_INPUT:


    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Enter your password below:", "Login", "Cancel");


     


    // Example for DIALOG_STYLE_LIST:


    ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "AK47\nM4\nSniper Rifle", "Option 1", "Option 2");


     


    // Example for DIALOG_STYLE_PASSWORD:


    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Enter your password below:", "Login", "Cancel");


     


    // Example for DIALOG_STYLE_TABLIST:


    ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_TABLIST, "Buy Weapon", "Deagle\t$5000\t100\nSawnoff\t$5000\t100\nPistol\t$1000\t50", "Select", "Cancel");



    // Example for DIALOG_STYLE_TABLIST_HEADERS:
    ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_TABLIST_HEADERS, "Buy Weapon", "Weapon\tPrice\tAmmo\nDeagle\t$5000\t100\nSawnoff\t$5000\t100\nPistol\t$1000\t50", "Select", "Cancel");

    Creditos: Wiki SA-MP



    ShowPlayerDialog D07Xwqb
    ShowPlayerDialog Yjab9HN
    NicolaV
    NicolaV
    --> Postador Fanático
    --> Postador Fanático


    Celular : 88 88 888888888
    Mensagens : 435
    Moedas : 3039
    Data de inscrição : 07/07/2018
    Idade : 19
    Localização : São Paulo/Capital

    ShowPlayerDialog Empty Re: ShowPlayerDialog

    Mensagem por NicolaV Dom 26 Mar 2023 - 13:50

    Muito bom, por mais que tenha experiência, esquecemos de muitas coisas simples.

      Data/hora atual: Qui 9 maio 2024 - 7:52