How to insert int into dialog ?
#2

this is possible:

First of all You must have a varible for player balance.... Let me show you

pawn Код:
new pbalance[MAX_PLAYERS];//this is my var for player balance use your var in which you are saving player balance or what ever it is
Now On Command in which you are showing player dialog you have to use format like this:
See this for more about format:https://sampwiki.blast.hk/wiki/Format
pawn Код:
new msg[64];//we will format it for our message + varaible in message
format(msg,sizeof(msg),"Your balance is : %d",pbalance[playerid]);// %d uses for integar variable and this will use value of pbalance[playerid] , just your varaible for balance here in place of pbalance[playerid]
//now time for dialog
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Bank Balnce",msg,"Okay","Close");// here msg is format we define above
Enjoy it.... Hope it helps you.
Reply


Messages In This Thread
How to insert int into dialog ? - by vernz - 10.03.2012, 03:35
Re: How to insert int into dialog ? - by Shabi RoxX - 10.03.2012, 03:51
Respuesta: How to insert int into dialog ? - by vernz - 10.03.2012, 03:56

Forum Jump:


Users browsing this thread: 2 Guest(s)