help with moneybank
#1

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

explain more and show the whole code
Reply
#3

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

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]);
   
}
Reply
#5

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

Did you have any function of saving and loading cash?
Reply
#7

You should use a timer with the TextDrawSetString, or just whenever you give/take a value from the PlayerInfo[playerid][pAccount].
Reply
#8

Nope... can you help with this?
Reply
#9

Hello!

You should work with a timer to update the money regularly.

Mencent
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)