TabListDialogTest(playerid)
{
new listitems[(sizeof (weapinfo) * 16) + 1];
for (new i; i != sizeof (weapinfo); ++i)
{
format(listitems, sizeof (listitems), "%s%s\t$%i\n", listitems, weapinfo[i][weapname], weapinfo[i][weapid]);
}
ShowPlayerDialog(playerid,2,DIALOG_STYLE_TABLIST,"Buy Weapon",listitems,"Select","Cancel");
}
TabListHeadersDialogTest(playerid)
{
new listitems[] =
"Weapon\tPrice\tAmmo\n" \
"Deagle\t$5000\t100\n" \
"Sawnoff\t$5000\t100\n" \
"Pistol\t$1000\t50\n" \
"M4\t$10000\t100\n" \
"MP5\t$7500\t200\n" \
"Grenade\t$500\t1\n" \
"Parachute\t$10000\t1\n" \
"Lorikeet\t$50000\t500\n";
ShowPlayerDialog(playerid,2,DIALOG_STYLE_TABLIST_HEADERS,"Buy Weapon",listitems,"Select","Cancel");
}
if(checkpointid == ammu....)
{
TabListDialogTest(playerid)
{
new listitems[(sizeof (weapinfo) * 16) + 1];
for (new i; i != sizeof (weapinfo); ++i)
{
format(listitems, sizeof (listitems), "%s%s\t$%i\n", listitems, weapinfo[i][weapname], weapinfo[i][weapid]);
}
ShowPlayerDialog(playerid,2,DIALOG_STYLE_TABLIST,"Buy Weapon",listitems,"Select","Cancel");
}
}
Thank you.
If i want to show the dialog after entering an ammu-nation buying checkpoint, Can it be like this?: pawn Код:
|
If i want to show the dialog after entering an ammu-nation buying checkpoint, Can it be like this?
|
Yes, that's how I made it on my script but I still can't make it to work the same way but with HEADERS :/
|
new listitems[(sizeof (weapinfo) * 16) + 25] = "Weapon Name\tWeapon ID\n";
for (new i; i != sizeof (weapinfo); ++i)
{
format(listitems, sizeof (listitems), "%s%s\t%i\n", listitems, weapinfo[i][weapname], weapinfo[i][weapid]);
}
ShowPlayerDialog(playerid,2,DIALOG_STYLE_TABLIST_HEADERS,"Weapon",listitems,"Select","Cancel");