Money bar
#1

my money bar is not getting updated, yet the players statistics are... please help.
Код:
Player[playerid][Money] += 1000;
Reply
#2

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.
Reply
#3

is the money bar textdraw or progress
Reply
#4

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.
Reply
#5

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,
Reply
#6

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

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?
Reply
#8

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(playeridparams[])
{
    
PlayerInfo[playerid][Money] += 100;

replace to

PHP код:
CMD:money(playeridparams[])
{
   
GivePlayerCash(playerid100); //same as GivePlayerMoney but the differ is it connects the variable with it.

Reply
#9

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(playeridparams[])
{
    
PlayerInfo[playerid][Money] += 100;

replace to

PHP код:
CMD:money(playeridparams[])
{
   
GivePlayerCash(playerid100); //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]; 
Reply
#10

simply, these are variables mixed together forming a Specific one, added together
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)