22.07.2018, 01:09
(
Последний раз редактировалось InsaneBR; 22.07.2018 в 12:32.
)
Topo do GM:
PS: Mude os valores(ids) se vocк jб usou para definir outra dialog com o mesmo.
Apуs definir, mude o parвmetro dialogid.
PHP код:
#define dLojaApple 100
#define dLA1 101
#define dLA2 102
Apуs definir, mude o parвmetro dialogid.
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/lojaapple", true) == 0) {
ShowPlayerDialog(playerid, dLojaApple, DIALOG_STYLE_TABLIST_HEADERS, "Apple", "Produtos\tServiзo\nCelulares\tApple\nComputadores\tApple\nNotebooks\tApple", "Selecionar", "Fechar");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == dLojaApple)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, dLA1, DIALOG_STYLE_TABLIST_HEADERS, "Apple", "Produtos\tPreзo\niPhone X\t$6999\niPhone 8 Plus\t$4599\niPhone 8\t$3999\niPhone 7 Plus\t$3799\niPhone 7\t$3199", "Selecionar", "Fechar");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, dLA2, DIALOG_STYLE_TABLIST_HEADERS, "Apple", "Produtos\tPreзo\niMac\t$9799\niMac Pro\t$37999", "Selecionar", "Fechar");
}
}
}
return 1;
}