Money In Dialog
#1

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
Reply
#2

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

pawn Код:
new szStr[ 128 ];
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
Reply
#3

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)