Money bar -
Zachlive - 12.10.2012
my money bar is not getting updated, yet the players statistics are... please help.
Код:
Player[playerid][Money] += 1000;
Re: Money bar -
Camacorn - 12.10.2012
You have to save the players stats after updating their money, and then load their stats. Or simply use giveplayermoney as well as updating the statistic variable.
Re: Money bar -
zT KiNgKoNg - 12.10.2012
is the money bar textdraw or progress
Re: Money bar -
Camacorn - 12.10.2012
Quote:
Originally Posted by Ultra-Gaming
is the money bar textdraw or progress
|
He means the default money bar, and this topic has been resolved.
Re: Money bar -
Zachlive - 12.10.2012
Sorry, but isnt there a way ( i forget how ) to tell it to add the player money (giveplayermoney) when that is used?
So like if I "Player[playerid][Money] -= 9;" It also does "GivePlayerMoney(playerid, -9)" ?
Thank you in advanced,
Re: Money bar -
Youice - 12.10.2012
Quote:
Originally Posted by Zachlive
Sorry, but isnt there a way ( i forget how ) to tell it to add the player money (giveplayermoney) when that is used?
So like if I "Player[playerid][Money] -= 9;" It also does "GivePlayerMoney(playerid, -9)" ?
Thank you in advanced,
|
Is there a Connector between them?
if no, then
Код:
stock GivePlayerCash(playerid, amoney)
{
PlayerInfo[playerid][Money] = amoney;
}
That's an example for how to connect them. (if you do so like that, then you will need to make a bit changes)
Re: Money bar -
Zachlive - 12.10.2012
Quote:
Originally Posted by Youice
Is there a Connector between them?
if no, then
Код:
stock GivePlayerCash(playerid, amoney)
{
PlayerInfo[playerid][Money] = amoney;
}
That's an example for how to connect them. (if you do so like that, then you will need to make a bit changes)
|
Alright, I think I will use that?
What type of changes do I need to make?
Re: Money bar -
Youice - 12.10.2012
assume I know what you have done in the script, then replace the variable & the function that gives the player money.
example:
PHP код:
CMD:money(playerid, params[])
{
PlayerInfo[playerid][Money] += 100;
}
replace to
PHP код:
CMD:money(playerid, params[])
{
GivePlayerCash(playerid, 100); //same as GivePlayerMoney but the differ is it connects the variable with it.
}
Re: Money bar -
Zachlive - 12.10.2012
Quote:
Originally Posted by Youice
assume I know what you have done in the script, then replace the variable & the function that gives the player money.
example:
PHP код:
CMD:money(playerid, params[])
{
PlayerInfo[playerid][Money] += 100;
}
replace to
PHP код:
CMD:money(playerid, params[])
{
GivePlayerCash(playerid, 100); //same as GivePlayerMoney but the differ is it connects the variable with it.
}
|
Thank you it works! but I have one question, how do I do stuff like this?
PHP код:
Player[Player[playerid][BeingTicketed]][Money] += Player[Player[playerid][BeingTicketed]][TicketPrice];
Re: Money bar -
Youice - 12.10.2012
simply, these are variables mixed together forming a Specific one, added together