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

Status X - Remove Player Names on Crosshair [v1.1]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 12-04-2023 , 14:03   Status X - Remove Player Names on Crosshair [v1.1]
Reply With Quote #1

PHP Code:
=========================================================================================================================================================================================================================================
C:\
=       
Status X           -  AMX Mod X scriptCopyright © 2023WATCH_DOGS UNITED.
=
=========================================================================================================================================================================================================================================
=
============================ ================================================================================================= ==========================================================================================================
=         
Credits          | |                                        Credits Reason                                         | |                                               Web Address
============================ ================================================================================================= ==========================================================================================================
=                          | |                                                                                               | |
=  
AMX Mod X               | | Plugin creation opportunity© Copyright AMX Mod X Dev Team;                                  | | https://www.amxmodx.org
=  WATCH_DOGS UNITED       | | Plugin creation;                                                                              | | https://gamebanana.com/members/1725138
=  Cuttlas                 | | Plugin creation request and bug reporting.                                                    | | https://forums.alliedmods.net/member.php?u=257185
=                          | |                                                                                               | |
============================ ================================================================================================= ==========================================================================================================
=
================
=  
Description |
================
=
=  Use 
this plugin if you want to specify if the enemyteammate, or hostage status will be visible for a specific team when aiming.
=
=  
Below are some of the consequences of disabling status:
=
=  
Disabling status could make it harder for the player to conclude who/what ()e's aiming in the darkness or other sort of obfuscation;
=  Disabling status may give more concentration and naturality, or realism for the game;
=  Disabling status may reduce CPU usage by a bit due to the long strings removal;
=  Disabling status may reduce visual chaos;
=  Disabling status may produce a more innovative gameplay.
=
=  The sense of it'
s configuration is up to the plugin's user.
=
================
=  Commands    |
================
=
=  sts_ct            -  Specifies the team status available for Counter-Terrorists. 3 = Both team status; 2 = Counter-Terrorists; 1 = Terrorists; 0 = None. Default: 3 ( Both )
=  sts_t             -  Specifies the team status available for         Terrorists. 3 = Both team status; 2 = Counter-Terrorists; 1 = Terrorists; 0 = None. Default: 3 ( Both )
=
=  sts_hg            -  Specifies the hostage status availability for a team. 3 = Both teams; 2 = only for Counter-Terrorists; 1 = only for Terrorists. 0 = None of them. Default: 3 ( Both )
=
=  Note:             -  Currently, when a cvar is changed, it will have effect as soon as the player aims to the opposed team or the hostages.
=
=========================================================================================================================================================================================================================================
=  Changelog   |
================
=
=  Dec 04, 2023 - v1.0     -  Initial release.
=  Dec 05, 2023 - v1.1     -  Fixed some issues.
=
=      [ FIXED ]           -  Fixed wrong check for terrorists.
=      [ FIXED ]           -  Replaced the way of checking for valid clients by a conventional way. The detection of the quitter id was incorrect and could exclude some clients.
=
========================================================================================================================================================================================================================================= 
Attached Files
File Type: zip Status X v1.1.zip (2.3 KB, 51 views)
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com

Last edited by WATCH_D0GS UNITED; 12-05-2023 at 14:56. Reason: Updated to v1.1
WATCH_D0GS UNITED is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 12-05-2023 , 13:29   Re: Status X - Remove Player Names on Crosshair
Reply With Quote #2

thank you bro for your nice job.

Here are my settings:
sts_ct = 2
sts_t = 2
sts_hg =0

I did not test the hostage part. but for CT it is OK, they can see their team names and can not see T's names.
But about the Terror team, it is vice versa. but in value 2, the Terror team can also see their team names and can not see CT names, I think value 2 should cause Terror only to see CT names and not their names.


also please add the check for the spectator team, for some reason some spec players should available as ghosts in the map, I also need to remove their name on crosshair
__________________
To Infinity n Beyond
Cuttlas is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 12-05-2023 , 15:02   Re: Status X - Remove Player Names on Crosshair [v1.1]
Reply With Quote #3

PHP Code:
=  Dec 052023 v1.1     -  Fixed some issues.
=
=      [ 
FIXED ]           -  Fixed wrong check for terrorists.
=      [ 
FIXED ]           -  Replaced the way of checking for valid clients by a conventional wayThe detection of the quitter id was incorrect and could exclude some clients
These team checks were really confusing

EDIT:

Kept unneeded #DEFINEs. We are currently trying a different way of obtaining the quitter id.
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com

Last edited by WATCH_D0GS UNITED; 12-05-2023 at 15:50.
WATCH_D0GS UNITED is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 12-05-2023 , 16:28   Re: Status X - Remove Player Names on Crosshair [v1.1]
Reply With Quote #4

How can such a small plugin have so many senseless stuff. Don’t try to be fancy if you have no clue what you are doing.
__________________
Jhob94 is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 12-05-2023 , 16:41   Re: Status X - Remove Player Names on Crosshair [v1.1]
Reply With Quote #5

It works the way it should.
And you should quote what is non sensical for you.
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com
WATCH_D0GS UNITED is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 12-05-2023 , 17:55   Re: Status X - Remove Player Names on Crosshair [v1.1]
Reply With Quote #6

So many stuff that I don’t even know where to start.
The defines are making no sense.
Making a define to get cvar value is just senseless, harder to read and will confuse inexperienced programmers.
The operation could be much cheaper if you defined on ham_spawn what the players can see.

I could go on and on but i am on mobile phone and it’s time to sleep.
__________________
Jhob94 is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 12-05-2023 , 19:53   Re: Status X - Remove Player Names on Crosshair [v1.1]
Reply With Quote #7

Quote:
Originally Posted by Jhob94 View Post
The defines are making no sense.
We've kept the (#define joiner) and the (#define quitter) because we are currently making a research to use them soon in the next plugin update.

Quote:
Originally Posted by Jhob94 View Post
Making a define to get cvar value is just senseless, harder to read and will confuse inexperienced programmers.
We are not creating the num #define to get a cvar value, it is just a string replacement for making the code narrow and faster to read.
It is simply a shortened way of writing get_pcvar_num, which is a code styling case.
The definition of num is already there, the programmer will see it in the beginning of the code.
We've not added a comment about this in front of the #define because this will cause a error.

Quote:
Originally Posted by Jhob94 View Post
The operation could be much cheaper if you defined on ham_spawn what the players can see.
The StatusText event/message is the right place for this purpose: it is called in the moment the print occurs.
With ham_spawn, a cvar change will take effect only in a new spawn, which will be horrible to make a test.

As an additional note, using a pdata to remove the print in the spawn moment is a low call frequency case.
We prefer something being applied faster.

What we could do is to make the two versions of the plugin.

--
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com

Last edited by WATCH_D0GS UNITED; 12-05-2023 at 20:18.
WATCH_D0GS UNITED is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 12-06-2023 , 12:32   Re: Status X - Remove Player Names on Crosshair [v1.1]
Reply With Quote #8

I know what your defined “num” is for and makes no sense. It’s exactly the opposite of being readable.
You should use defines to make random stuff more readable, like pdata offsets.
You do as you want, i am just saying that new users learn from other people’s code and use a define for a pcvar seems very messy.

About ham_spawn i mean about retrieving data. Like getting user team could be retrieved at spawn and used later. Afaik the event is called very often, but my memory may be tricking me.
__________________
Jhob94 is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 12-06-2023 , 13:54   Re: Status X - Remove Player Names on Crosshair [v1.1]
Reply With Quote #9

Indeed, making the team check at ham_spawn will save CPU because it is called once in the spawn moment,
while the StatusText is called a variable amount of times/sec. depending on the player aim, but not that many times per second, around 2 or 4 (per player).
It is not called when not aiming a player/hostage.

But you shouldn't forget that this is when aiming. The targeted player is detected in this moment.
How will you retrieve the <targeted> player in spawn?.

The team check in ham_spawn is valid only for the iPlayer.
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com

Last edited by WATCH_D0GS UNITED; 12-06-2023 at 13:59.
WATCH_D0GS UNITED is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 12-06-2023 , 15:32   Re: Status X - Remove Player Names on Crosshair [v1.1]
Reply With Quote #10

For real players you can store it something like g_iTeam[id]. Or if you want you can play with macros creating one for Ts and one for CTs.
__________________
Jhob94 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 05:22.


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