Help with ZP Hud
Hello, what I want is to change the color of the hud but change from several colors that transforms, for example, to green and then transforms to green
I don't know if it's possible? I had a zombie plague where that could be but I wanted to know how, My hud changes color but only blinks white This is the part of the script where the hud is located if(g_hud_type[ID_SHOWHUD] == 0) { // Default set_hudmessage(40, 230, 76, -8.0, 0.75, 1, 6.0, 1.1, 0.0, 0.0, -1) ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync[1], "|%s|^n|%L - %s| - |%L - %s|^n|%L - %s| - |%L - %s|^n", g_playername[ID_SHOWHUD], id, "ZOMBIE_ATTRIB1", add_point(get_user_health(ID_SHOWHUD)), id, "ZOMBIE_ATTRIB5", add_point(get_user_armor(ID_SHOWHUD)), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", add_point(g_ammopacks[ID_SHOWHUD])) } |
Re: Help with ZP Hud
I clarify what I want is not to change color, what I want is for the same hud to change color as time goes by and change to several colors
|
Re: Help with ZP Hud
If you want to use random colors, simply replace the first 3 arguments in "set_hudmessage" with "random(256)".
If you want to use a predefined set of colors of your choioce, then things will get a little more complicated. You will need to create a 3-dimensional array that holds each set of colors, and then iterate that array and use its elements as arguments in "set_hudmessage". Example of how the array should be created: Code:
* Note: I used "static" because I defined it as a local array. If you need to use it in more than one place, define it as a global variable using "new". Add/remove as many colors as you want. Then you will need a variable (global new or local static) that holds the current iteration, starting from 0, up to the size of the array. Code:
Then, use the "set_hudmessage" function with the current color set: Code:
Display the message and all other stuff related to it. Next, add +1 to the "CURRENT_COLOR" variable. If it reached the end of the array, reset it back to 0. Code:
|
Re: Help with ZP Hud
I recommend keeping red to at least 50(random_num(50, 255)) if you're gonna use fully random colors or else you will just get washed out or ugly ones.
|
Re: Help with ZP Hud
Quote:
|
Re: Help with ZP Hud
Quote:
https://forums.alliedmods.net/showthread.php?t=272418 |
| All times are GMT -4. The time now is 03:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.