Making textdraw dialog list
#1

I have codes of textdraw for buying weapons in ammunation but I want to change them to dialog list rather than textdraw. How can I do that?

Код:
			case BUS_TYPE_AMMUNATION:
			{
			if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
			{
			ShowTextDrawMenu(playerid, TD_MENU_AMMUNATION,"~g~Ammunation", 20, 20);

			if (PlayerInfo[playerid][pGunLic] == 0)format(string, sizeof(string), "Weapon Permit: ~r~No");else format(string, sizeof(string), "Weapon Permit: ~y~Yes");
			ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
			format(string, sizeof(string), "~g~$%d",GOLF_CLUB_PRICE);
			ShowTextDrawMenuItems(playerid, 1, " ", "~y~1 ~w~- Golf Club", string ,GOLF_CLUB_PRICE);
			format(string, sizeof(string), "~g~$%d",BASEBALL_BAT_PRICE);
			ShowTextDrawMenuItems(playerid, 2, " ", "~y~2 ~w~- Baseball Bat", string ,BASEBALL_BAT_PRICE);
			format(string, sizeof(string), "~g~$%d",SHOVEL_PRICE);
			ShowTextDrawMenuItems(playerid, 3, " ", "~y~3 ~w~- Shovel", string ,SHOVEL_PRICE);
			format(string, sizeof(string), "~g~$%d",POOL_CUE_PRICE);
			ShowTextDrawMenuItems(playerid, 4, " ", "~y~4 ~w~- Pool Cue", string ,POOL_CUE_PRICE);
			format(string, sizeof(string), "~g~$%d",CANE_PRICE);
			ShowTextDrawMenuItems(playerid, 5, " ", "~y~5 ~w~- Cane", string ,CANE_PRICE);
			format(string, sizeof(string), "~g~$%d",CHAINSAW_PRICE);
			ShowTextDrawMenuItems(playerid, 6, " ", "~y~6 ~w~- Chainsaw", string ,CHAINSAW_PRICE);
			format(string, sizeof(string), "~g~$%d",PISTOL_PRICE);
			ShowTextDrawMenuItems(playerid, 7, " ", "~y~7 ~w~- Pistol ~r~150 Ammo", string ,PISTOL_PRICE);
			format(string, sizeof(string), "~g~$%d",SILENCED_PISTOL_PRICE);
			ShowTextDrawMenuItems(playerid, 8, " ", "~y~8 ~w~- Silenced Pistol ~r~150 Ammo", string ,SILENCED_PISTOL_PRICE);
			format(string, sizeof(string), "~g~$%d",DESERT_EAGLE_PRICE);
			ShowTextDrawMenuItems(playerid, 9, " ", "~y~9 ~w~- Desert Eagle ~r~150 Ammo", string ,DESERT_EAGLE_PRICE);
			format(string, sizeof(string), "~g~$%d",SHOTGUN_PRICE);
			ShowTextDrawMenuItems(playerid, 10, " ", "~y~10 ~w~- Shotgun ~r~150 Ammo", string ,SHOTGUN_PRICE);
			format(string, sizeof(string), "~g~$%d",SAWNOFF_SHOTGUN_PRICE);
			ShowTextDrawMenuItems(playerid, 11, " ", "~y~11 ~w~- Sawn Off Shotgun ~r~150 Ammo", string ,SAWNOFF_SHOTGUN_PRICE);
			format(string, sizeof(string), "~g~$%d",COMBAT_SHOTGUN_PRICE);
			ShowTextDrawMenuItems(playerid, 12, " ", "~y~12 ~w~- Combat Shotgun ~r~150 Ammo", string ,COMBAT_SHOTGUN_PRICE);
			format(string, sizeof(string), "~g~$%d",MAC10_PRICE);
			ShowTextDrawMenuItems(playerid, 13, " ", "~y~13 ~w~- Mac 10 ~r~200 Ammo", string ,MAC10_PRICE);
			format(string, sizeof(string), "~g~$%d",TEC9_PRICE);
			ShowTextDrawMenuItems(playerid, 14, " ", "~y~14 ~w~- Tec9 ~r~200 Ammo", string ,TEC9_PRICE);
			format(string, sizeof(string), "~g~$%d",MP5_PRICE);
			ShowTextDrawMenuItems(playerid, 15, " ", "~y~15 ~w~- MP5 ~r~200 Ammo", string ,MP5_PRICE);
			format(string, sizeof(string), "~g~$%d",AK47_PRICE);
			ShowTextDrawMenuItems(playerid, 16, " ", "~y~16 ~w~- AK47 ~r~200 Ammo", string ,AK47_PRICE);
			format(string, sizeof(string), "~g~$%d",M4_PRICE);
			ShowTextDrawMenuItems(playerid, 17, " ", "~y~17 ~w~- M4 ~r~200 Ammo", string ,M4_PRICE);
			format(string, sizeof(string), "~g~$%d",RIFLE_PRICE);
			ShowTextDrawMenuItems(playerid, 18, " ", "~y~18 ~w~- Rifle ~r~100 Ammo", string ,RIFLE_PRICE);
			format(string, sizeof(string), "~g~$%d",SNIPER_RIFLE_PRICE);
			ShowTextDrawMenuItems(playerid, 19, " ", "~y~19 ~w~- Sniper Rifle ~r~100 Ammo", string ,SNIPER_RIFLE_PRICE);
			format(string, sizeof(string), "~g~$%d",BODY_ARMOUR_PRICE);
			ShowTextDrawMenuItems(playerid, 20, " ", "~y~20 ~w~- Body Armour", string ,BODY_ARMOUR_PRICE);
			}
			}
Reply
#2

please help
Reply
#3

no one?
Reply
#4

U can't really convert them but re-make it with usage of dialogs instead.
Learn how to use dialogs, it's more easier than textdraws.
Reply
#5

I know how to make dialog but i am confused little bit about how to use these variables in showplayerdialog. Can u give me an example
Reply
#6

help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)