Raised This Month: $90 Target: $400
 22% 

Solved Edit hud


Post New Thread Reply   
 
Thread Tools Display Modes
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 03-16-2019 , 05:56   Re: Edit hud
Reply With Quote #11

Quote:
Originally Posted by Moody92 View Post
I don't think overlapping is the word here. It just replaces the old with the new and I think it's fine since all messages are appearing in 1 hud channel. I don't know if that causes any performance issues though.
AMXX 1.9 set channel to -1 (auto) by default.
__________________
<VeCo> is offline
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 03-16-2019 , 06:08   Re: Edit hud
Reply With Quote #12

Quote:
Originally Posted by <VeCo> View Post
AMXX 1.9 set channel to -1 (auto) by default.
If they truly overlap and use 3/4 hud channels because by the 12th second the first channel will be available, you'd see numbers interjoining each other. And that's not happening, is it?

EDIT: Nvm. I think you're half right. The color becomes white because they overwrite each other. I still don't think they overlap.

Last edited by Moody92; 03-16-2019 at 06:17.
Moody92 is online now
Old 03-16-2019, 06:17
Moody92
This message has been deleted by Moody92.
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 03-16-2019 , 06:21   Re: Edit hud
Reply With Quote #13

Quote:
Originally Posted by NikodIsBack View Post
the blue color is not set, now it's white hud
The hud is refreshing way faster than the color can stablize, the color starts from bright blue and then settles to the blue you chose.

You need to choose a darker blue color to achieve what you want.

PHP Code:
#include <amxmodx>



#define PLUGIN "New Plug-in"

#define VERSION "1.0"

#define AUTHOR "eDward /R/"



new site



#define TASK_INTERVAL 3.0
#define FADEIN 0.0
#define FADEOUT 0.0


public plugin_init()

{

    
register_pluginPLUGINVERSIONAUTHOR );

    
set_taskTASK_INTERVAL"RandomHudWithRandomColors"0""0"b"  );

    
site register_cvar("amx_site","www.laleagane.ro");

}



public 
RandomHudWithRandomColors()

{

    new 
timeleft get_timeleft()

    new 
map[33]

    
get_mapname(map,32)



    new 
forum[51]

    
get_pcvar_string(site,forum,50)

    

    
set_hudmessage6589255, -1.00.0400.0TASK_INTERVAL 0.1FADEINFADEOUT )

    
show_hudmessage0"TimeLeft: %d:%02d | %s | Harta: %s"timeleft 60timeleft 60forummap )



Last edited by Moody92; 03-16-2019 at 16:31.
Moody92 is online now
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-16-2019 , 10:12   Re: Edit hud
Reply With Quote #14

Why not simply set the holdtime to be the same as TASK_INTERVAL? This way the message will disappear just before the next one appears and the colors will remain as set.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 03-16-2019 , 16:31   Re: Edit hud
Reply With Quote #15

Quote:
Originally Posted by OciXCrom View Post
Why not simply set the holdtime to be the same as TASK_INTERVAL? This way the message will disappear just before the next one appears and the colors will remain as set.
Excuse my ignorance, never actually read the whole set_hudmessage native. Now that I have, setting the hold time to equal task_interval prompts flickering of the hud, so I just added a 0.1 second there to prevent that. Also, I think the fade-in and fade-out time have an impact on the color so I set them to 0.

OP you should look at my last post. It should work for you now.

EDIT: The color will still flicker to white and back, unless you use a darker color, but now it's way less white than it was before.

Last edited by Moody92; 03-16-2019 at 16:35.
Moody92 is online now
NikodIsBack
Junior Member
Join Date: Jan 2019
Old 03-17-2019 , 05:45   Re: Edit hud
Reply With Quote #16

thx guys a lot
NikodIsBack is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:10.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode