AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Info Message HUD v1.3 (https://forums.alliedmods.net/showthread.php?t=204863)

Blizzard_87 01-04-2013 08:28

Info Message HUD v1.3
 
1 Attachment(s)
Info Message HUD
v1.3
By Blizzard_87 / guipatinador

ThreadStart
-= [ Description ] =-

simple HUD message which shows some server info, was requested in Suggestions/Requests, so i made it then thought id release it here also.

-= [ Authors ] =-

Blizzard_87: original idea and code.

guipatinador: optimized original code, then rewrote it more optimized and simplified.

-= [ Usage ] =-

Shows HUD in Center/Top of Screen

TimeLeft 08:00 | <HostName> | Map: cs_assault

-= [ Console Command (Admin Only)] =-

hud_color

blue
red
green
white
purple
gold
silver
orange
aqua
yellow

-= [ Cvar(s)] =-

hud_type

1 = only for alive people
2 = only for dead people
3 = for all (default)

hud_x_pos -1.0 (default)
hud_y_pos 0.0 (default)

-= [ Credits ] =-

* guipatinador: Optimizing Code.

-= [ ScreenShot(s) ] =-

http://steamcommunity.com/sharedfile.../?id=118036220

Change Log:
Spoiler


ThreadEnd
.

guipatinador 01-04-2013 08:47

Re: Info Message HUD
 
You could add,
- a cvar to enable / disable the HUD message to alive / dead people
- a cvar to change the color of the letters

wickedd 01-04-2013 08:53

Re: Info Message HUD
 
Useless. Also, you don't need to release every plugin you write.

Blizzard_87 01-04-2013 08:54

Quote:

Originally Posted by guipatinador (Post 1866829)
You could add,
- a cvar to enable / disable the HUD message to alive / dead people
- a cvar to change the color of the letters

thanks for the idea. I'll get onto that tomorrow.

MERGE EDIT 1
Quote:

Originally Posted by wickedd (Post 1866833)
Useless. Also, you don't need to release every plugin you write.

why it useless?

I couldn't find one already made.

I've found heaps of people requesting something like this

wickedd 01-04-2013 13:23

Re: Info Message HUD
 
There are a few plugins that does this already that is posted in the request section. Also, you don't need to post every plugin you write here. Plus, if anyone should have release it, it should have been guipatinador his code.

Blizzard_87 01-04-2013 17:42

Re: Info Message HUD v1.1
 
updated sma

Groven 01-06-2013 22:56

Re: Info Message HUD v1.1
 
This is awesome! But can you add thetime to it aswell and delete the server name since its not needed.

You can do it like Time, Thetime, Current Map, Next Map: Not yet voted

Blizzard_87 01-07-2013 15:50

Re: Info Message HUD v1.1
 
Quote:

Originally Posted by Groven (Post 1868635)
This is awesome! But can you add thetime to it aswell and delete the server name since its not needed.

You can do it like Time, Thetime, Current Map, Next Map: Not yet voted

thanks. and I'll get onto it when I get home.
I'll try add settings to enable disable different items to display in the message.

Kiske 01-07-2013 21:36

Re: Info Message HUD v1.1
 
I think is better replace set_task with a think (https://forums.alliedmods.net/showthread.php?t=43049).


Use this for menu and handler
PHP Code:

enum _:MenuStruct {
    
colorNames[16],
    
colorRed,
    
colorGreen,
    
colorBlue,
    
message[32],
    
position[2]
};

new const 
GoorK[][] = {
    {
"Red"25500"You Changed Color To Red!""1"},
    {
"Blue"00255"You Changed Color To Blue!""2"},
    {
"Green^n"02550"You Changed Color To Green!""3"},
    {
"White"255255255"You Changed Color To White!""4"}
}


// Example:
new i;
for(
0sizeof(GoorK); ++i)
    
menu_additem(menuidGoorK[i][colorNames], GoorK[i][position]);


// In handler:
new key str_to_num(data) - 1;
    
server_cmd("hud_red_amount %d"GoorK[key][colorRed]);
server_cmd("hud_blue_amount %d"GoorK[key][colorBlue]);
server_cmd("hud_green_amount %d"GoorK[key][colorGreen]);
    
client_print(idprint_centerGoorK[key][message]); 


Blizzard_87 01-08-2013 00:33

Re: Info Message HUD v1.1
 
thanks I'll add it soon when I get time tonight.

[edit]

tried it but it comes back with runtime errors...

since my cvars set the SINGLE numbers on each not all 3 for each color....

the way you done it should work like this 255, 255, 255,

but way i done it works like

255
255
255

not in one line.


All times are GMT -4. The time now is 00:12.

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