Деньги из банка в TextDraw, по умолчанию стоит переменная pAccount.
Ко всем new:
Code
new Text:pare0[MAX_PLAYERS];
forward Cosak(playerid);
new CosakTimer[MAX_PLAYERS];
В OnPlayerConnect:
Code
CosakTimer[playerid]=SetTimerEx("Cosak", 800,1,"i", playerid);
//--Pare sistem--
pare0[playerid] = TextDrawCreate(497.000000, 97.000000, "$0000000");
TextDrawBackgroundColor(pare0[playerid], 255);
TextDrawFont(pare0[playerid], 3);
TextDrawLetterSize(pare0[playerid], 0.700000, 2.200000);
TextDrawColor(pare0[playerid], -32568);
TextDrawSetOutline(pare0[playerid], 1);
TextDrawSetProportional(pare0[playerid], 1);
В конец мода:
Code
public Cosak(playerid)
{
new pare = GetPlayerMoney(playerid);
new acc = PlayerInfo[playerid][pAccount];
new string[128];
if(acc > 0)
{
format(string, sizeof(string), "$%d", acc);
TextDrawSetString(pare0[playerid], string);
TextDrawShowForPlayer(playerid, pare0[playerid]);
}
else if(acc < 0)
{
format(string, sizeof(string), "~r~-$%d", acc);
TextDrawSetString(pare0[playerid], string);
TextDrawShowForPlayer(playerid, pare0[playerid]);
}
else if(acc == 0)
{
format(string, sizeof(string), "$0");
TextDrawSetString(pare0[playerid], string);
TextDrawShowForPlayer(playerid, pare0[playerid]);
}
return 1;
}
В OnPlayerDisconnect:
Code
KillTimer(CosakTimer[playerid]);