How to insert value of GetPVarInt into a player text draw
#4

Yeah I did use PlayerTextDrawShow(). Here's more details

My full code
pawn Код:
CashTextDraw[playerid] = CreatePlayerTextDraw(playerid, 560.0, 108.0, "Cash: 0");
PlayerTextDrawSetShadow(playerid, CashTextDraw[playerid], 1);
PlayerTextDrawAlignment(playerid, CashTextDraw[playerid], 3);
PlayerTextDrawFont(playerid, CashTextDraw[playerid], 1);
PlayerTextDrawColor(playerid, CashTextDraw[playerid], 0xFF0000AA);
PlayerTextDrawSetOutline(playerid, CashTextDraw[playerid], 1);
PlayerTextDrawShow(playerid, CashTextDraw[playerid]);

SetPVarInt(playerid, "Cash", 362528);
new PlayerCashBalance[25];
format(PlayerCashBalance, sizeof(PlayerCashBalance), "Cash: %d", GetPVarInt(playerid, "Cash"));
PlayerTextDrawSetString(playerid, CashTextDraw[playerid], PlayerCashBalance);
PlayerTextDrawShow(playerid, CashTextDraw[playerid]);
Here's the result



Here's the server log with the printf code
Код:
[22:08:02] Incoming connection: 25.23.69.146:65384
[22:08:02] [join] SlonCHL has joined the server (0:25.23.69.146)
[22:08:02] Textdrawstring: Cash: 362528
[22:09:07] [part] SlonCHL has left the server (0:1)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)