Colorful HUDs. -
HY - 27.02.2015
Colorful Huds.

Introduction:
This it's a simple filterscript, wich can create colorfuls huds as you can see in first picture. Like that, you can create huds for cash and for fist in
12 colors. All colors can be found, right here as defines:
pawn Код:
#define hud_red -16776961
#define hud_green 16711935
#define hud_fuchsia -16711681
#define hud_cyan 16777215
#define hud_orange -5963521
#define hud_maroon -2147483393
#define hud_yellow -65281
#define hud_blue 65535
#define hud_brown -1523963137
#define hud_lightblue -1378294017
#define hud_purple -2147450625
#define hud_grey -2139062017
#define hud_lime 16711935
Functions:
SetPlayerHudColor(playerid, hud, hud_colors) - Will set huds colors to specified color.
pawn Код:
hud_fist - For fist.
hud_cash - For cash.
hud_cashicon - For $ cash icon.
hud_cash will show to player how many cash it's him havin'.
RemovePlayerFistHud(playerid) - Will remove player's fist hud.
RemovePlayerCashHud(playerid) - Will remove player's cash hud.
RemovePlayerCashIconHud(playerid) - Will remove player's cash icon
$ hud.
RemovePlayerHuds(playerid) - Will remove player's huds.
Example:
An example script it's right here:
pawn Код:
CMD:cash(playerid, params[])
{
SetPlayerHudColor(playerid, hud_fist, hud_red);
SetPlayerHudColor(playerid, hud_cash, hud_cyan);
SetPlayerHudColor(playerid, hud_cashicon, hud_blue);
return 1;
}
Will set's player fist hud to
red and will set player cash hud to
cyan and will set player's green
$ to blue.
Download:
- Pastebin;
- Solidfiles;
- hud.inc
NOTE: Player's fist hud will work fine
only if specified player doesn't have any guns.
Re: Colorful HUDs. -
Team_PRO - 27.02.2015
Good good.
OT: I just recognize you signature it's not "sinucide" it's "Suicide".
Re: Colorful HUDs. -
Kyance - 27.02.2015
Nice job.
You can use OnPlayerUpdate to detect the players weapon too (GetPlayerWeapon), and if it's not the fist (ID: 0), then you can hide the textdraw for the player - But if the weapon is fist and his "Hud" variable is 1, then you show it.
Also, I think you forgot to reset the "Hud" variable in two of the "Remove___Hud" functions
Re: Colorful HUDs. -
hamzajaved780 - 27.02.2015
nice job
Re: Colorful HUDs. -
Nenzittow - 27.02.2015
Great job!
Re: Colorful HUDs. -
TheSnaKe - 27.02.2015
Not bad, good.
Re: Colorful HUDs. -
Golf - 27.02.2015
Nice one
Re: Colorful HUDs. -
M0HAMMAD - 27.02.2015
very nice, i like it.
Re: Colorful HUDs. -
HY - 27.02.2015
Quote:
Originally Posted by Team_PRO
Good good.
OT: I just recognize you signature it's not "sinucide" it's "Suicide".
|
Lol, thanks.

I made mistake, now it's alright.
Quote:
Originally Posted by Kyance
Nice job.
You can use OnPlayerUpdate to detect the players weapon too (GetPlayerWeapon), and if it's not the fist (ID: 0), then you can hide the textdraw for the player - But if the weapon is fist and his "Hud" variable is 1, then you show it.
Also, I think you forgot to reset the "Hud" variable in two of the "Remove___Hud" functions
|
No. I didn't forgot anything, can you show me exactly line?
Also, thanks for feedback.
Quote:
Originally Posted by hamzajaved780
nice job
|
Quote:
Originally Posted by Nenzittow
Great job! 
|
Quote:
Originally Posted by TheSnaKe
Not bad, good.
|
Quote:
Originally Posted by Golf
Nice one
|
Quote:
Originally Posted by M0HAMMAD
very nice, i like it.
|
Thanks.
Little update:
- Added more hud's colors:
pawn Код:
#define hud_red -16776961
#define hud_green 16711935
#define hud_fuchsia -16711681
#define hud_cyan 16777215
#define hud_orange -5963521
#define hud_maroon -2147483393
#define hud_yellow -65281
#define hud_blue 65535
#define hud_brown -1523963137
#define hud_lightblue -1378294017
#define hud_purple -2147450625
#define hud_grey -2139062017
#define hud_lime 16711935
- All links have been re-uploaded.
Future update:
- More hud's colors;
- Progress bar for creating a colorful
health &
armour bars.
- Colorful
$ green cash. Working on it, uploading in 10 minutes!
- If you have any suggestions, about what I should do in this script, please reply here with your idea!
Thanks!
Re: Colorful HUDs. -
$$inSane - 28.02.2015
This can be improved:
pawn Код:
SetPlayerHUDColor(playerid, hud, color);
GetPlayerHUDColor(playerid, hud);
ResetPlayerHUDColor(playerid, hud);
AND, Includes section is proper place for these kinda threads.
Actually i had this idea in back 2013 but was demolished cause this wont work with the players having custom HUD mods.