[HELP] Show list in DialogStyleList with 'if' possible strcat
#1

Hi, i want put in Dialog a list with itens of player, for example.
I have Item 1, item 2 and item 4;

and i want show, in dialog.

pawn Код:
if(PlayerHaveEagle == 1)
 {
    format(string,sizeof(string),"Item 1: Eagle (Have)\n");
 }
 else{
    format(string,sizeof(string),"Item 1: Eagle (Don't Have)\n");
 }
 if(PlayerHaveKnife == 1)
 {
    format(string,sizeof(string),"Item 1: Knife (Have)\n");
 }
 else{
    format(string,sizeof(string),"Item 1: Knife (Don't Have)\n");
 }if(PlayerHaveShotgun == 1)
 {
    format(string,sizeof(string),"Item 1: ShotGun (Have)\n");
 }
 else{
    format(string,sizeof(string),"Item 1: ShotGun (Don't Have)\n");
 }
 strcat(str,string);
 ShowPlayerDialog(playerid, DialogWeapons, DIALOG_STYLE_LIST, "Chose a weapon to get:", str, "Select", "Cancel");
Is only a base of my idea, so don't have script complete, i need only base to create correct, this method is correct?

But, how show in dialog it? with strcat?
Reply


Messages In This Thread
[HELP] Show list in DialogStyleList with 'if' possible strcat - by iryston - 13.08.2014, 22:51
Re: [HELP] Show list in DialogStyleList with 'if' possible strcat - by Jefff - 13.08.2014, 23:08
Re: [HELP] Show list in DialogStyleList with 'if' possible strcat - by iryston - 14.08.2014, 01:06
Re: [HELP] Show list in DialogStyleList with 'if' possible strcat - by Jefff - 14.08.2014, 01:16
Re: [HELP] Show list in DialogStyleList with 'if' possible strcat - by iryston - 14.08.2014, 01:48

Forum Jump:


Users browsing this thread: 3 Guest(s)