Status X - Remove Player Names on Crosshair [v1.1]
1 Attachment(s)
PHP Code:
|
Re: Status X - Remove Player Names on Crosshair
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 :) |
Re: Status X - Remove Player Names on Crosshair [v1.1]
PHP Code:
EDIT: Kept unneeded #DEFINEs. We are currently trying a different way of obtaining the quitter id. |
Re: Status X - Remove Player Names on Crosshair [v1.1]
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.
|
Re: Status X - Remove Player Names on Crosshair [v1.1]
It works the way it should.
And you should quote what is non sensical for you. |
Re: Status X - Remove Player Names on Crosshair [v1.1]
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. |
Re: Status X - Remove Player Names on Crosshair [v1.1]
Quote:
Quote:
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:
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. -- |
Re: Status X - Remove Player Names on Crosshair [v1.1]
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. |
Re: Status X - Remove Player Names on Crosshair [v1.1]
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. |
Re: Status X - Remove Player Names on Crosshair [v1.1]
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.
|
All times are GMT -4. The time now is 19:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.