[Include] SA-MP Dialogs
#1

SA-MP Dialogs
Versгo: 0.1.0
Include para tornar sua vida utilizando dialogs mais facil e rбpida.

Caracterнsticas:
  • Retorno de chamada para dialogs.
  • Criaзгo de dialogs dinвmicos e estбticos.
  • Formatar info diretamente na funзгo de mostrar, sem necessidade de chamar format antes.
  • Nova callback OnDialogPerformed, chamada antes do retorno da dialog.
Examplos:

Criando e mostrando dialogo para o player.

PHP Code:
CreateDialog:Dialog(playeridstylecaption[], info[], button1[], button2[])
{
    
style DIALOG_STYLE_MSGBOX;
    
caption "Hello World!";
    
button1 "Hello";
    
button2 "World";
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
format(infosizeof(info), "Hello %s. What you think about?"name);
}
public 
OnPlayerConnect(playerid)
{
    
ShowDialog(playeridDialog);
}
Dialog:Dialog(playeriddialogidresponselistiteminputtext[])
{
    
SendClientMessage(playerid, -1response "You clicked at button 1" :  "You clicked at button 0");
    return 
true;


Mostrando dialogo sem criaзгo:

PHP Code:
public OnPlayerConnect(playerid)
{
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
ShowPlayerDialog(playeridDialogDIALOG_STYLE_MSGBOX"Hello World!""Hello %s. What you think about?""Hello""World"name);
}
Dialog:Dialog(playeriddialogidresponselistiteminputtext[])
{
    
SendClientMessage(playerid, -1response "You clicked at button 1" :  "You clicked at button 0");
    return 
true;

Download: https://github.com/Dayvison/Dialogs-Samp/releases
Repositуrio: https://github.com/Dayvison/Dialogs-Samp
Reply


Messages In This Thread
SA-MP Dialogs - by Dayvison_ - 03.09.2016, 05:19
Respuesta: SA-MP Dialogs - by SammyJ - 03.09.2016, 09:21
Re: SA-MP Dialogs - by pWesley - 03.09.2016, 12:18
Re: SA-MP Dialogs - by Ender_ - 03.09.2016, 12:31
Re: SA-MP Dialogs - by Dayvison_ - 03.09.2016, 14:28
Re: SA-MP Dialogs - by Whoo - 03.09.2016, 17:57
Re: SA-MP Dialogs - by Ermanhaut - 04.09.2016, 07:04
Re: SA-MP Dialogs - by PT - 04.09.2016, 09:51

Forum Jump:


Users browsing this thread: 1 Guest(s)