SA-MP Forums Archive
[AJUDA] GPS - 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] GPS (/showthread.php?tid=252908)



[AJUDA] GPS - Shadoww5 - 03.05.2011

Fiz esse codigo:

pawn Код:
if(strcmp(cmd,"/casagps", true) == 0)
    {
        for( new h = 0; h < sizeof(HouseInfo); h ++)
        {
            new gpstring[50];
            format(gpstring,sizeof(gpstring),"Casa %d",HouseInfo);
            ShowPlayerDialog(playerid,999,DIALOG_STYLE_LIST,"GPS das casas:",gpstring,"Selecionar","Sair");
        }
        return 1;
    }
Sei que estб errado, atй porque nгo estб mostrando o que eu quero. Mas o que eu quero ? Quando alguem digitar /casagps, mostrasse "Casa 1, Casa 2, Casa 3 ..." - cada uma em uma linha - Mas nгo sei como faзo isso sem ter que colocar de uma por uma no codigo.

OBS: GM Base - BSL


Re: [AJUDA] GPS - Macintosh - 03.05.2011

pawn Код:
#define GPSCASAS 999
pawn Код:
if(strcmp(cmd,"/casagps", true) == 0)
{
     ShowPlayerDialog(playerid,GPSCASAS,DIALOG_STYLE_LIST,"GPS das casas:",gpstring,"Selecionar","Sair");
     return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
 if(dialogid == GPSCASAS)
 {
  if(response)
  {
   if(listitem == 0)
   {
    // CORDENADAS CASA 1
    return 1;
   }
   if(listitem == 1)
   {
    // CORDENADAS CASA 2
    return 1;
   }
   if(listitem == 2)
   {
    // CORDENADAS CASA 3
    return 1;
   }
   if(listitem == 3)
   {
    // CORDENADAS CASA 4
    return 1;
   }
  }
 }
 return 1;
}



Re: [AJUDA] GPS - Ricop522 - 03.05.2011

O seu comando estб errado shick.


Re: [AJUDA] GPS - Macintosh - 03.05.2011

Quote:
Originally Posted by Ricop522
Посмотреть сообщение
O seu comando estб errado shick.
;s й que nгo lembro muito de dialog.