Raised This Month: $32 Target: $400
 8% 

Info Message HUD v1.3


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 01-04-2013 , 08:28   Info Message HUD v1.3
Reply With Quote #1

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
.
Attached Files
File Type: sma Get Plugin or Get Source (InfoMsg_1.3.sma - 1926 views - 4.8 KB)

Last edited by Blizzard_87; 04-25-2015 at 13:11. Reason: Updated v1.3
Blizzard_87 is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 01-04-2013 , 08:47   Re: Info Message HUD
Reply With Quote #2

You could add,
- a cvar to enable / disable the HUD message to alive / dead people
- a cvar to change the color of the letters
guipatinador is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-04-2013 , 08:53   Re: Info Message HUD
Reply With Quote #3

Useless. Also, you don't need to release every plugin you write.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 01-04-2013 , 08:54  
Reply With Quote #4

Quote:
Originally Posted by guipatinador View Post
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 View Post
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

Last edited by YamiKaitou; 01-04-2013 at 08:58.
Blizzard_87 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-04-2013 , 13:23   Re: Info Message HUD
Reply With Quote #5

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.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 01-04-2013 , 17:42   Re: Info Message HUD v1.1
Reply With Quote #6

updated sma
Blizzard_87 is offline
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 01-06-2013 , 22:56   Re: Info Message HUD v1.1
Reply With Quote #7

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
__________________
Groven is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 01-07-2013 , 15:50   Re: Info Message HUD v1.1
Reply With Quote #8

Quote:
Originally Posted by Groven View Post
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.
Blizzard_87 is offline
Kiske
Veteran Member
Join Date: May 2009
Old 01-07-2013 , 21:36   Re: Info Message HUD v1.1
Reply With Quote #9

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]); 

Last edited by Kiske; 01-07-2013 at 21:38.
Kiske is offline
Send a message via Skype™ to Kiske
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 01-08-2013 , 00:33   Re: Info Message HUD v1.1
Reply With Quote #10

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.

Last edited by Blizzard_87; 01-08-2013 at 04:56.
Blizzard_87 is offline
Reply



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 01:02.


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