[Pedido] Colocar em DIALOG_STYLE_TABLIST - 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: [Pedido] Colocar em DIALOG_STYLE_TABLIST (
/showthread.php?tid=583120)
Colocar em DIALOG_STYLE_TABLIST -
LuisFerreira - 26.07.2015
Bom tentei algumas vezes mais nгo consegui.. й simples mais й novo e algo que nгo aprendi lidar assim.. se poder me ajudar.
Tipo '' ID - Level - Preзo''
PHP код:
COMMAND:casas(playerid, params[])
{
SendAdminText(playerid, "/casas", params);
new niList[2800];
for(new i; i < MAX_HOUSES; i++)
if((AHouseData[i][Owned] == false) && (AHouseData[i][PickupID] != 0))
format(niList, sizeof(niList), "%sCasa ID: %d (Level - %d), Preзo:R$:%d\n", niList, i, AHouseData[i][HouseMaxLevel], AHouseData[i][HousePrice]);
if(strlen(niList) != 0)
ShowPlayerDialog(playerid, DialogCasasVenda, DIALOG_STYLE_LIST, "{FF0000}# {FFFFFF}Casas", niList, "Ok", "Cancelar");
else
SendClientMessage(playerid, -1, "{FF0000}Nгo hб nenhuma casa disponнvel para venda");
return 1;
}
Obrigado.
Re: Colocar em DIALOG_STYLE_TABLIST -
iTakelot - 26.07.2015
So uma pergunta, porque voce formata a string com 2800 celulas '-
PHP код:
COMMAND:casas(playerid, params[])
{
SendAdminText(playerid, "/casas", params);
new niList[2800];
strins(niList,"Id\tLevel\tPreзo\n",strlen(niList));
for(new i; i < MAX_HOUSES; i++)
if((AHouseData[i][Owned] == false) && (AHouseData[i][PickupID] != 0))
format(niList, sizeof(niList), "%s%d\t%d\t%d\n", niList, i, AHouseData[i][HouseMaxLevel], AHouseData[i][HousePrice]);
if(strlen(niList) != 0)
ShowPlayerDialog(playerid, DialogCasasVenda, DIALOG_STYLE_TABLIST_HEADERS, "{FF0000}# {FFFFFF}Casas", niList, "Ok", "Cancelar");
else
SendClientMessage(playerid, -1, "{FF0000}Nгo hб nenhuma casa disponнvel para venda");
return 1;
}
Re: Colocar em DIALOG_STYLE_TABLIST -
LuisFerreira - 26.07.2015
Deu certinho amigo VLW ^^.