AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Solved Edit hud (https://forums.alliedmods.net/showthread.php?t=314943)

NikodIsBack 03-14-2019 11:37

Edit hud
 
Hello i have this plugin https://pastebin.com/jrAEmMfe currently this plugin has 2 colors, blue and aqua blue, I just want to keep the color in this image https://imgur.com/a/1Rg8TGA and that's blue

<VeCo> 03-14-2019 11:43

Re: Edit hud
 
Right now it shows random color.

For that blue, replace "random(255), random(255) , random(255)" with "65, 89, 255"

NikodIsBack 03-14-2019 14:27

Re: Edit hud
 
Code:

#include <amxmodx>



#define PLUGIN "New Plug-in"

#define VERSION "1.0"

#define AUTHOR "eDward /R/"



new site



#define TASK_INTERVAL 3.0



public plugin_init()

{

    register_plugin( PLUGIN, VERSION, AUTHOR );

    set_task( TASK_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_hudmessage( 65,89,255, -1.0, 0.04 )

    show_hudmessage( 0, "TimeLeft: %d:%02d | %s | Harta: %s", timeleft / 60, timeleft % 60, forum, map )

}

it„s not working man

OciXCrom 03-14-2019 18:32

Re: Edit hud
 
What's not working?

NikodIsBack 03-15-2019 06:05

Re: Edit hud
 
the blue color is not set, now it's white hud

OciXCrom 03-15-2019 08:46

Re: Edit hud
 
That can't possibly happen by changing the color to be specifically "65, 89, 255".

<VeCo> 03-15-2019 11:40

Re: Edit hud
 
The default hold time duration for HUD is 12 seconds("Wtf?" yeah, i know), multiple messages overlap on top of eachother.

PHP Code:

set_hudmessage65,89,255, -1.00.04, .holdtime TASK_INTERVAL 


NikodIsBack 03-16-2019 05:05

Re: Edit hud
 
hello guys it„s still not working with this set https://i.imgur.com/krngsOT.jpg

<VeCo> 03-16-2019 05:37

Re: Edit hud
 
works fine for me, make sure you compiled the plugin properly and replaced the .amxx after that

Moody92 03-16-2019 05:49

Re: Edit hud
 
Quote:

Originally Posted by <VeCo> (Post 2643439)
The default hold time duration for HUD is 12 seconds("Wtf?" yeah, i know), multiple messages overlap on top of eachother.

PHP Code:

set_hudmessage65,89,255, -1.00.04, .holdtime TASK_INTERVAL 


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.


All times are GMT -4. The time now is 11:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.