Define
#1

Hey guys,

Im making a dialog where you can buy guns. Now im trying to make dynamic prices behind the weapon like this:
pawn Code:
ShowPlayerDialog(playerid, HANDWEP, DIALOG_STYLE_LIST, "Choose the weapon you want", "Knife($KNIFE) \nBaseball Bat($BASEBALL) \nShovel($SHOVEL) \nKatana($KATANA) \nChainsaw($CHAINSAW)", "Buy", "Back");
The ($KNIFE) is a define, just like all the other things. Somehow, it shows ingame just like this in the dialog:
Knife($KNIFE)
It should be "Knife($500)". I got all the defines right, and i dont see the problem here. Can anyone help me with this?

Weapon prices defines:
pawn Code:
#define KNIFE               500
#define BASEBALL            800
#define SHOVEL              900
#define KATANA              1000
#define CHAINSAW            1500
~Wesley
Reply
#2

Show your dialogs.
Reply
#3

Well, its with all the dialogs the same. In the first post theres a example of one, defines are down, and it shows like:
Knife($KNIFE) in the dialog (ingame)
Reply
#4

Silly me - should've taken a better look at the topic. Try this:
pawn Code:
ShowPlayerDialog(playerid, HANDWEP, DIALOG_STYLE_LIST, "Choose the weapon you want", "Knife($" #KNIFE ") \nBaseball Bat($" #BASEBALL ") \nShovel($" #SHOVEL ") \nKatana($" #KATANA ") \nChainsaw($" #CHAINSAW ")", "Buy", "Back");
Reply
#5

Yep works, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)