Raised This Month: $12 Target: $400
 3% 

HUD Team Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
Koneuka
Junior Member
Join Date: Nov 2017
Old 11-23-2017 , 09:18   HUD Team Chat
Reply With Quote #1

Description:
Simply converts team chat into hud team chat on your left screen side.

Obviously dead can see only dead msg and alive only alive.

CVARS:
hudteamchat 0|1 - turn plugin on/off

Credits:
Exolent - hudchat include created by this legend man, but I never saw it in use.
Black Rose - 90% of hook say code is his. Original post with most helpful description I ever found in here https://forums.alliedmods.net/showpo...13&postcount=8

ChangeLog:
0.1
*first realease
Attached Images
File Type: jpg screen.jpg (94.2 KB, 1316 views)
Attached Files
File Type: inc hudchat.inc (4.1 KB, 277 views)
File Type: sma Get Plugin or Get Source (hudteamchat.sma - 376 views - 1.5 KB)

Last edited by Koneuka; 11-28-2017 at 14:48.
Koneuka is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 11-24-2017 , 09:16   Re: HUD Team Chat
Reply With Quote #2

this is pointless from my point of view. And imo, things like that will never get approved, because 95% of the code is an include file made by someone else.
__________________
retired chump
DjSoftero is offline
Koneuka
Junior Member
Join Date: Nov 2017
Old 11-24-2017 , 16:59   Re: HUD Team Chat
Reply With Quote #3

Quote:
Originally Posted by DjSoftero View Post
this is pointless from my point of view. And imo, things like that will never get approved, because 95% of the code is an include file made by someone else.
I get your opinion and from this point you are right. The reason why I uploaded it is Exolent never actually added <hudchat> include as part of his job, that can be useful for people. I found it in only 1 topic and I didn't find any other plugin, that did chat style msg update, but in HUD. I added there names as authors in code, cause it would be unrespectful to lie I have done all the code. So even if the plugin won't get approved people will know <hudchat> include exists and can be used in there scripting in any other future plugins. Your opinion partly right, but it could be you agree mine has truth in it as well. Any correction appreciated ;)
Koneuka is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-26-2017 , 10:49   Re: HUD Team Chat
Reply With Quote #4

Code:
new SenderAlive = is_user_alive(id) if (SenderAlive == is_user_alive(tempPlayer))
What does this stands for?
__________________
Relaxing is offline
Koneuka
Junior Member
Join Date: Nov 2017
Old 11-26-2017 , 16:15   Re: HUD Team Chat
Reply With Quote #5

Quote:
Originally Posted by Relaxing View Post
Code:
new SenderAlive = is_user_alive(id) if (SenderAlive == is_user_alive(tempPlayer))
What does this stands for?
Checking if sender and receiver are both alive or death
Koneuka is offline
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 11-27-2017 , 13:20   Re: HUD Team Chat
Reply With Quote #6

Why using that instead of
PHP Code:
if (is_user_alive(id) == is_user_alive(tempPlayer)) 
__________________
TheWhitesmith is offline
Koneuka
Junior Member
Join Date: Nov 2017
Old 11-27-2017 , 15:31   Re: HUD Team Chat
Reply With Quote #7

Quote:
Originally Posted by TheWhitesmith View Post
Why using that instead of
PHP Code:
if (is_user_alive(id) == is_user_alive(tempPlayer)) 
More comfy for me. Doesn't affect any functionality
Koneuka is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 11-28-2017 , 07:21   Re: HUD Team Chat
Reply With Quote #8

Quote:
Originally Posted by Koneuka View Post
Doesn't affect any functionality
it does affect the performance of the plugin, as you`re allocating memory for the variable which is going to be used only once.
__________________
retired chump
DjSoftero is offline
Koneuka
Junior Member
Join Date: Nov 2017
Old 11-28-2017 , 09:53   Re: HUD Team Chat
Reply With Quote #9

Quote:
Originally Posted by DjSoftero View Post
it does affect the performance of the plugin, as you`re allocating memory for the variable which is going to be used only once.
True. Updated
Koneuka is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-28-2017 , 12:22   Re: HUD Team Chat
Reply With Quote #10

What are you all talking about?

PHP Code:
new SenderAlive is_user_alive(id)
if (
SenderAlive == is_user_alive(tempPlayer)) 
This is correct.

PHP Code:
if (is_user_alive(id) == is_user_alive(tempPlayer)) 
This is incorrect.

Why would you check if the user is alive 32 times instead of checking it only once? How is the variable used only once when it's inside a loop? Don't listen to them and revert back the changes. Caching the value in a variable because it's going to be used more than once is absolutely correct.
__________________

Last edited by OciXCrom; 11-28-2017 at 12:22.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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:02.


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