Add a status bar for SA-MP
pawn Код:
DisableHealthBar(disable);
SetPlayerMaxHealth(Float:Health);
DrawBar(playerid, name, x, y, color1, color2);
ShowBar(playerid, name);
HideBar(playerid, name);
SetBarStatus(playerid, name, amount);
SetBarMaxStatus(playerid, name, maxamount);
DisableHealthBar
disable - disable - 0, enable - 1.
SetPlayerMaxHealth
Float:Health - is a Float of player max health points.
DrawHealtBar
playerid - id of player.
name - name of bar.
x - Float
on monitor.
y - Float:y on monitor.
color1 - amount in hex of color1.
color2 - amount in hex of color2.
Код:
Max resolution of monitor = 800:600(x:y)
ShowBar
playerid - id of player.
name - name of bar to show.
HideBar
playerid - id of player.
name - name of bar to hide.
SetBarStatus
playerid - id of player.
name - name of bar to set status.
amount - amount of bar(0-maxamount).
SetBarMaxStatus
playerid - id of player.
name - name of bar to set status.
maxamount - Max amount of bar(minimal max amount is 1).
Example of this status bar(amount - 109, maxamount - 157)
Код:
I - color1, II - color2