alittle small problem
#1

guys nw i have my own server -side money ( based on the text draw ) how do i use it instead the original green money bar of gta also how to set the original green bar all the time to 00000000 ,,,, the main idea how do i cancel the original money bar and use my own
Reply
#2

You can not make the default money bar disapear.
I suggest making the server read and write from the server sided value of the money, when this value is changed, use SetPlayerMoney to make ir show up at the player. Do never use GetPlayerMoney though, as you might be reading a cheated value then.
Reply
#3

1st i dont want to dissapear the defult money bar i said i want to set the deefult money bar always to zero ,,, i make a new money bar (text draw ) and all i need to do to use this textdraw instead of using the defult ones
Reply
#4

bump
Reply
#5

bump
Reply
#6

You can 'disable' the green money bar by just never using SetPlayerMoney. If you dont give them money like that you dont use it. You can always overwrite it with a textdraw to make it 'dissapear'
Reply
#7

could u clearify more ( srry iam new scripter )
Reply
#8

The methods used for the 'green money bar' as you describe, is SetPlayerMoney and GetPlayerMoney (also the stuntbonuses and the vending machines use that money). If you dont use those commands you dont use that green bar and it will not change.

so in stead of this:
pawn Код:
if(GetPlayerMoney(playerid) > 50) // money is higher than 50 USD
 // action
You do this:
pawn Код:
if(getPlayerMoney(playerid) > 50) // note the first character is lower case!
 // action
I have now used a function to get the players money but you can also use variables if you prefer that. You can then use the method like this:
pawn Код:
static getPlayerMoney(playerid) {
return playerInfo[playerid][money];
}
If you use those, you can put a textdraw with the amount got from getPlayerMoney OVER the original money amount so they dont see that thing (like putting a piece of paper over your keyboard so you cant see the keyboard)
Reply
#9

ok nw i got ,, but if i want to give a player the server sided money or to make him buy with that money what should i do
Reply
#10

Server sided money is the money not shown in the money bar in the screen, right?

You can use the method that I described as second (with the static method, but then use a setter to set his money). Though, I don't know how you have set up your server sided money so I can't help you with that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)