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

[Native]Multichannel DHUD Message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 04-23-2015 , 15:45   [Native]Multichannel DHUD Message
Reply With Quote #1

Multichannel DHUD Message
Version: 0.0.1

This simple native will allow you to display multiple Director HUD messages on screen with using channels.
I make this native for my WIP mod and decided to share with you.




Description:

Max channels: 8(0-7).
Max message lenght: 128 chars.
Using 0 in id param will show a message to all players.
For test install test plugin and write "mcdhud" in console.

Functions:

The mcdhud_set() and mcdhud_show() mimic the style of set_hudmessage() and show_hudmessage().

Code:
mcdhud_set(red, green, blue, Float:x, Float:y, effects, Float:fxtime, Float:holdtime, Float:fadeintime, Float:fadeouttime, channel, bool:reliable);
mcdhud_show(id, const message[], any:...);
mcdhud_chanel_clear(id, chanel);

Credits:
Arkshine Director Hud Message

Attached Files:

mcdhud_api.inc //Include
mcdhud_api.sma //API Plugin
mcdhud_test.sma //Test Plugin
Attached Files
File Type: inc mcdhud_api.inc (1.3 KB, 673 views)
File Type: sma Get Plugin or Get Source (mcdhud_api.sma - 1494 views - 5.5 KB)
File Type: sma Get Plugin or Get Source (mcdhud_test.sma - 1446 views - 712 Bytes)
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 04-23-2015 at 16:47.
Hedgehog Fog is offline
milutinke
AlliedModders Donor
Join Date: Jun 2012
Location: Serbia
Old 04-23-2015 , 18:41   Re: [Native]Multichannel DHUD Message
Reply With Quote #2

Good Job, it is going to be very useful
milutinke is offline
Send a message via Skype™ to milutinke
JusTGo
Veteran Member
Join Date: Mar 2013
Old 04-24-2015 , 06:24   Re: [Native]Multichannel DHUD Message
Reply With Quote #3

rly nice this should be added to the next amx 1.8.3
JusTGo is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-24-2015 , 08:05   Re: [Native]Multichannel DHUD Message
Reply With Quote #4

This won't happen. Hint messages are not designed internally to work with channels, this API essentially re-sends each time 8 messages, just to update or clear one. This is really not a good idea, this means that you will get overlapping effects + times values being now pointless (since you reset previous times) + firing x8 large client messages at once means overloading network unnecessary.

This also defeats the purpose of a hint message, this is not supposed to be used dynamically.

The only use of the API I can see, is if you need to show like 8 messages at once, all the time, and not caring about time/effect.
__________________

Last edited by Arkshine; 04-24-2015 at 08:24.
Arkshine is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 04-24-2015 , 08:25   Re: [Native]Multichannel DHUD Message
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
This won't happen. Hint messages are not designed internally to work with channels, this API essentially re-sends each time 8 messages, just to update or clear one. This is really not a good idea, this means that you will get overlapping effects + times values being now pointless (since you reset previous times) + firing x8 large client messages at once means overloading network unnecessary.

This also defeats the purpose of a hint message, this is not supposed to be used dynamically.

The only use of the API I can see, is if you need to show like 8 messages at once, all the time, and not caring about time/effect.
Yea
tousif is offline
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 04-24-2015 , 08:44   Re: [Native]Multichannel DHUD Message
Reply With Quote #6

Arkshine
I agree with you, this is not a good idea, but I think this is the only way.
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 04-24-2015 at 08:45.
Hedgehog Fog is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 04-25-2015 , 21:37   Re: [Native]Multichannel DHUD Message
Reply With Quote #7

Quote:
Originally Posted by Hedgehog95 View Post
Arkshine
I agree with you, this is not a good idea, but I think this is the only way.
I'm going to leave this here, and I'll go out slowly...

Quote:
Originally Posted by yokomo View Post
I bet he dont even care about server performance.. All he need is fancy thing lol.
Server performance always is the first priority
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 04-26-2015 , 19:04   Re: [Native]Multichannel DHUD Message
Reply With Quote #8

meTaLiCroSS,
I try to find best way to make HUD, 4 channels isn't enough for me.
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 04-26-2015 at 19:05.
Hedgehog Fog is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 04-28-2015 , 23:54   Re: [Native]Multichannel DHUD Message
Reply With Quote #9

Quote:
Originally Posted by Hedgehog95 View Post
meTaLiCroSS,
I try to find best way to make HUD, 4 channels isn't enough for me.
So go ahead and use another game for your mods, because goldsrc it's goldsrc and you cannot break client-side limits without editing client binaries. That's known
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 04-29-2015 , 00:54   Re: [Native]Multichannel DHUD Message
Reply With Quote #10

meTaLiCroSS
If I using dhud I can to display 8 messages, but dhud messages not good for me too.

Quote:
Originally Posted by Hedgehog95 View Post
I try to find best way to make HUD
And it's true. I'm trying to combine a default UI and dhud.
If it were possible not to hide health - I would use it. But hide the radar is a priority for me.
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 04-29-2015 at 00:55.
Hedgehog Fog 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 15:55.


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