Money In Dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Money In Dialog (
/showthread.php?tid=375154)
Money In Dialog -
zT KiNgKoNg - 05.09.2012
pawn Код:
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Greeting","Welcome Back To Las Ventruas Roleplay \n Current Money: \n Current Health: \n Current Armour: \n"COL_GREEN"","Ok","");
i need to show money,health and Armour
Re: Money In Dialog -
FalconX - 05.09.2012
Quote:
Originally Posted by Ultra-Gaming
pawn Код:
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Greeting","Welcome Back To Las Ventruas Roleplay \n Current Money: \n Current Health: \n Current Armour: \n"COL_GREEN"","Ok","");
i need to show money,health and Armour
|
First
then, you have to format this string so you can then put in the dialog.
pawn Код:
new Float:PlayerHP, Float:PlayerArmour; // declaring new float vars to save the player's health in
GetPlayerHealth( playerid, PlayerHP ); // getting players health
GetPlayerArmour( playerid, PlayerArmour); // getting players armour
format( szStr, sizeof( szStr ), "Health: %0.f\n\nArmour: %0.f\n\nMoney: %d", PlayerHP, PlayerArmour, GetPlayerMoney( playerid ) ); //formating szStr so we can show our requirements
ShowPlayerDialog( playerid, YOUR_DIALOG_ID, DIALOG_STYLE_MSGBOX, "Stats", szStr, "Okay", "" ); // put szStr as an info to show to the player
Re: Money In Dialog -
zT KiNgKoNg - 05.09.2012
thanks