[Ajuda] me ajuda com dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] me ajuda com dialog (
/showthread.php?tid=616186)
me ajuda com dialog -
caiomali06 - 01.09.2016
http://imgur.com/a/Oh8h6 bom dia fiz esse dialog e queria sabe como eu faзo pra quando eu clickar nesse nome do dialog apareзer o nick dos donos dos frentes e etc, alguem pra me ajdudar
Re: me ajuda com dialog -
arakuta - 01.09.2016
https://sampwiki.blast.hk/wiki/OnDialogResponse
https://sampforum.blast.hk/showthread.php?tid=119297
Respuesta: me ajuda com dialog -
SammyJ - 01.09.2016
Explicaзгo nos comentбrios no code.
+ duvidas? poste-as.
OBS: Nгo testei, fiz rapidinho, qualquer erro avise, ou olhe o code e tente ver onde esta o erro, ira te ajudar bastante.
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == HIERAQUIA)// coloque o id do dialog que vocк criou aqi
{
if(!response)
return 1;
switch(listitem)
{
case 0:// Dono
{
static
gstring[30], string[512];
for(new i; i < MAX_PLAYERS; ++i)// Looping para passar por todos os jogadores.
{
if(Player[i][Dono] && Player[i][Faccoes] == Player[playerid][Faccoes])//Aqui checa se o jogador й dono do morro, e й da mesma facзгo do jogador executou o comando.
{
format(gstring, sizeof(gstring), "%s\n", PlayerName(i));// formatar a string "gstring" para o nome do administrador e o \n faz pular uma linha ou seja mais um na lista
strcat(string, gstring);// aqui ele soma a "string" + "gstring" e volta ao Looping
}
}
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "[ Donos online ]", string, "OK", #);// Aqui ele mostra o dialog se tiver admin on
return 1;
}
}
}
return 1;
}
Re: me ajuda com dialog -
caiomali06 - 02.09.2016
mano tem skype ?
Re: Respuesta: me ajuda com dialog -
caiomali06 - 02.09.2016
Quote:
Originally Posted by Glederson_dom
Explicaзгo nos comentбrios no code.
+ duvidas? poste-as.
OBS: Nгo testei, fiz rapidinho, qualquer erro avise, ou olhe o code e tente ver onde esta o erro, ira te ajudar bastante.
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == HIERAQUIA)// coloque o id do dialog que vocк criou aqi
{
if(!response)
return 1;
switch(listitem)
{
case 0:// Dono
{
static
gstring[30], string[512];
for(new i; i < MAX_PLAYERS; ++i)// Looping para passar por todos os jogadores.
{
if(Player[i][Dono] && Player[i][Faccoes] == Player[playerid][Faccoes])//Aqui checa se o jogador й dono do morro, e й da mesma facзгo do jogador executou o comando.
{
format(gstring, sizeof(gstring), "%s\n", PlayerName(i));// formatar a string "gstring" para o nome do administrador e o \n faz pular uma linha ou seja mais um na lista
strcat(string, gstring);// aqui ele soma a "string" + "gstring" e volta ao Looping
}
}
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "[ Donos online ]", string, "OK", #);// Aqui ele mostra o dialog se tiver admin on
return 1;
}
}
}
return 1;
}

|
amigo tem skype pra me passar ?