[FilterScript] Colorful HUDs.
#1

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.
Reply
#2

Good good.

OT: I just recognize you signature it's not "sinucide" it's "Suicide".
Reply
#3

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
Reply
#4

nice job
Reply
#5

Great job!
Reply
#6

Not bad, good.
Reply
#7

Nice one
Reply
#8

very nice, i like it.
Reply
#9

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!
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)