Nгo entendi a razгo de vocк colocar " dinheiro " sendo que ali jб fica armazenado o dinheiro..
Bom, achei isso um cуdigo utel..
Olhei o cуdigo e percebi que vocк nгo setou um timer para atualizar , arruma isso ai..
pawn Код:
#include a_samp
new Text:Textdraw0,
Text:Textdraw1,
Text:Textdraw2,
Text:Textdraw3,
Text:Textdraw4,
Text:Textdraw5,
Celulas[128],
ip[16];
public OnGameModeInit()
{
SetTimer("Atualizar", 1000, true);
Textdraw0 = TextDrawCreate(477.000000, 113.000000, "Informacoes");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 3);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw1 = TextDrawCreate(639.000000, 114.000000, ".");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 5.399997);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 0x00000055);
TextDrawTextSize(Textdraw1, 473.000000, 105.000000);
Textdraw2 = TextDrawCreate(479.000000, 130.000000,"Dinheiro: %d");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.370000, 0.899999);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
Textdraw3 = TextDrawCreate(479.000000, 138.000000, "Score: %d");
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.370000, 0.899999);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);
Textdraw4 = TextDrawCreate(479.000000, 146.000000, "Ip: %s");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.370000, 0.899999);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 0);
TextDrawSetProportional(Textdraw4, 1);
TextDrawSetShadow(Textdraw4, 1);
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawSetString(Textdraw2,Celulas);
TextDrawSetString(Textdraw3,Celulas);
TextDrawSetString(Textdraw4,Celulas);
return 1;
}
forward Atualizar(playerid);
public Atualizar(playerid)
{
GetPlayerIp(playerid,ip,sizeof(ip));
format(Celulas, sizeof Celulas, "Dinheiro: %d", GetPlayerMoney(playerid));
TextDrawSetString(Textdraw2, Celulas);
format(Celulas, sizeof Celulas, "Score: %d", GetPlayerScore(playerid));
TextDrawSetString(Textdraw3, Celulas);
format(Celulas, sizeof Celulas, "Ip: %s", ip);
TextDrawSetString(Textdraw4, Celulas);
}