help with moneybank -
Rabea - 04.04.2015
pawn Код:
new string[256];
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
format(string, sizeof(string),"$%d",PlayerInfo[playerid][pAccount]);
Textdraw51[playerid] = TextDrawCreate(608.000000, 98.000000, " "); // bank money
TextDrawAlignment(Textdraw51[playerid], 3);
TextDrawBackgroundColor(Textdraw51[playerid], 255);
TextDrawFont(Textdraw51[playerid], 3);
TextDrawLetterSize(Textdraw51[playerid], 0.650000, 2.199999);
TextDrawColor(Textdraw51[playerid], 43775);
TextDrawSetOutline(Textdraw51[playerid], 1);
TextDrawSetProportional(Textdraw51[playerid], 1);
}
It doesen't show bank money like raven's rp one.
it doesn't even show any text draw.
help?
Re: help with moneybank -
Antoniohl - 04.04.2015
explain more and show the whole code
Re: help with moneybank -
Rabea - 04.04.2015
I am trying to do in my server like raven's roleplay, it shows to you the money of bank in blue textdraw under normal money, But it doesn't show anything, what's the problem?
Re: help with moneybank -
IceBilizard - 04.04.2015
Try this
pawn Код:
new string[256];
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
Textdraw51[playerid] = TextDrawCreate(608.000000, 98.000000, " "); // bank money
TextDrawAlignment(Textdraw51[playerid], 3);
TextDrawBackgroundColor(Textdraw51[playerid], 255);
TextDrawFont(Textdraw51[playerid], 3);
TextDrawLetterSize(Textdraw51[playerid], 0.650000, 2.199999);
TextDrawColor(Textdraw51[playerid], 43775);
TextDrawSetOutline(Textdraw51[playerid], 1);
TextDrawSetProportional(Textdraw51[playerid], 1);
format(string, sizeof(string),"$%d",PlayerInfo[playerid][pAccount]);
TextDrawSetString(Textdraw51[playerid], string);
TextDrawShowForPlayer(playerid, Textdraw51[playerid]);
}
Re: help with moneybank -
Rabea - 04.04.2015
Quote:
Originally Posted by IceBilizard
Try this
pawn Код:
new string[256]; for(new playerid = 0; playerid < MAX_PLAYERS; playerid++) { Textdraw51[playerid] = TextDrawCreate(608.000000, 98.000000, " "); // bank money TextDrawAlignment(Textdraw51[playerid], 3); TextDrawBackgroundColor(Textdraw51[playerid], 255); TextDrawFont(Textdraw51[playerid], 3); TextDrawLetterSize(Textdraw51[playerid], 0.650000, 2.199999); TextDrawColor(Textdraw51[playerid], 43775); TextDrawSetOutline(Textdraw51[playerid], 1); TextDrawSetProportional(Textdraw51[playerid], 1); format(string, sizeof(string),"$%d",PlayerInfo[playerid][pAccount]); TextDrawSetString(Textdraw51[playerid], string); TextDrawShowForPlayer(playerid, Textdraw51[playerid]); }
|
it worked, but its always shows $0
Re: help with moneybank -
IceBilizard - 04.04.2015
Did you have any function of saving and loading cash?
Re: help with moneybank -
CalvinC - 04.04.2015
You should use a timer with the TextDrawSetString, or just whenever you give/take a value from the PlayerInfo[playerid][pAccount].
Re: help with moneybank -
Rabea - 04.04.2015
Nope... can you help with this?
AW: help with moneybank -
Mencent - 04.04.2015
Hello!
You should work with a timer to update the money regularly.
Mencent
Re: help with moneybank -
Rabea - 04.04.2015
Quote:
Originally Posted by CalvinC
You should use a timer with the TextDrawSetString, or just whenever you give/take a value from the PlayerInfo[playerid][pAccount].
|
You mean, example update money in one second?