SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 05/09/2012, 04:27 PM   #1
zT KiNgKoNg
Gangsta
 
Join Date: Jun 2012
Location: $Location = $this->Location->Finder('United Kingdom');
Posts: 632
Reputation: 23
Default Money In Dialog

pawn Code:
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
__________________

zT KiNgKoNg is offline   Reply With Quote
Old 05/09/2012, 04:35 PM   #2
FalconX
Gangsta
 
FalconX's Avatar
 
Join Date: Mar 2011
Location: Kuwait
Posts: 635
Reputation: 103
Default Re: Money In Dialog

Quote:
Originally Posted by Ultra-Gaming View Post
pawn Code:
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 Code:
new szStr[ 128 ];

then, you have to format this string so you can then put in the dialog.

pawn Code:
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
__________________
Want help in scripting? PM me.
FalconX is offline   Reply With Quote
Old 05/09/2012, 06:47 PM   #3
zT KiNgKoNg
Gangsta
 
Join Date: Jun 2012
Location: $Location = $this->Location->Finder('United Kingdom');
Posts: 632
Reputation: 23
Default Re: Money In Dialog

thanks
__________________

zT KiNgKoNg is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Give Money instead of Taking ?(Dialog Shop) [D]ry[D]esert Scripting Help 4 31/05/2012 03:56 PM
[Include] money.inc - Advanced, plug-n-play, server-sided money system fiki574 Includes 7 25/02/2012 10:47 PM
[Include] Server-sided Money - Stop money hackers! NEW RELEASE(v6) x-cutter Includes 107 30/08/2011 07:56 PM
Dialog list as 24/7 when press cancel takes money slymatt Help Archive 3 20/07/2011 10:46 AM
PLZ I NEED DIALOG REG SYSTEM WITH MONEY SAVE vakhtang Help Archive 3 14/08/2010 11:09 AM


All times are GMT. The time now is 05:16 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.