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

Show Teammates Armament


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-26-2022 , 21:21   Show Teammates Armament
Reply With Quote #1

Show Teammates Armament


Release: 02/27/2022
Last Update: 03/27/2022

- Description
- This plugins display the whole teammates armament, incluiding weapons, grenades, armor type and cash information during freezetime, a good touch to use in 5x5 servers.

- Cvars
se_show_weapons = Display all weapons icons
se_show_money = Display money icons
se_show_utilities = Display grenades/defuse and c4 icons
se_show_arrow = Display a little arrow over players head
se_show_armortype = Display armor type
se_show_arrow_only = Show always an arrow icon over all players (default 0).
se_show_arrow_only_mode = 0 Both team's arrow will be seen, 1 only your teammate's arrows and 2 the enemy team's arrow will be seen.

se_sprite_color_weapons = default yellow
se_sprite_color_money = default green
se_sprite_color_grenades = default white (tried each grenade color individually, no pattern and combinations looks good, so by default all of them are the same color)
se_sprite_color_vesthelm = default purple
se_sprite_color_kevlar = default pink
se_sprite_color_arrow = default yellow
se_sprite_color_c4 = default orange
se_sprite_color_defusekit = default green

- Gameplay Images



- Credits
https://forums.alliedmods.net/showpo...01&postcount=4
https://forums.alliedmods.net/showpo...3&postcount=16

- Change log
Spoiler



Note: The sprites were tested with 32/32 podbots and nothing happened regarding crashes or lag with the sprites.
Attached Files
File Type: zip sprites.zip (25.6 KB, 581 views)
File Type: sma Get Plugin or Get Source (showequips.sma - 780 views - 14.0 KB)
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 03-27-2022 at 18:48.
EFFx is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 03-02-2022 , 13:55   Re: Show Teammates Armament
Reply With Quote #2

will check test it out and review the code when i have time. looks great. thank you for sharing and congrats.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
SoulWeaver16
Senior Member
Join Date: May 2021
Location: Uruguay
Old 03-02-2022 , 13:57   Re: Show Teammates Armament
Reply With Quote #3

Good plugin, I found that some of the sprites are floating instead of disappearing
And another thing would be, if you could add that the cvar of se_show_arrow, could remain the whole round and not only during freezetime
SoulWeaver16 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-02-2022 , 14:22   Re: Show Teammates Armament
Reply With Quote #4

Awesome plugin. I see this being widely used. So, here is some feedback:

-------------------------------------- [ 1 ] --------------------------------------

Code:
#define TASK_INV        4562 #define TASK_DISPLAY       4563 #define TASK_HIDE_ENTS    4564

This is a big 'no' and is likely the reason for the issue in the previous comment.
Unique task ids should have a difference of at least 32 between them - the maximum number of players.

I understand only the first one is being combined with player ids, but this will still cause issues. For example:

Player with id #1 has a TASK_INV of 4562+1=4563 which is equal to TASK_DISPLAY, player #2's task is equal to TASK_HIDE_ENTS, etc, so when interacting with the player's TASK_INV tasks, you can accidentally interact with one of the other tasks.

The simple solution:

Code:
enum (+= 32) {     TASK_INV = 4562,     TASK_DISPLAY,     TASK_HIDE_ENTS }

-------------------------------------- [ 2 ] --------------------------------------

Your plugin won't compile under 1.8.2 because MAX_PLAYERS is not defined.

Code:
#if !defined MAX_PLAYERS const MAX_PLAYERS = 32 #endif

-------------------------------------- [ 3 ] --------------------------------------

I don't see a code that removes the sprites when the player disconnects?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-02-2022 , 17:19   Re: Show Teammates Armament
Reply With Quote #5

Quote:
Originally Posted by SoulWeaver16 View Post
Good plugin, I found that some of the sprites are floating instead of disappearing
And another thing would be, if you could add that the cvar of se_show_arrow, could remain the whole round and not only during freezetime
I wasn't getting that issue... well, I've changed the way it removes the sprites. Now one by one players gets their sprites removed so it doesn't call the function too many times in a single second. Also your request about the arrow always over players head is added, turn se_show_arrow_only 1.

Quote:
Originally Posted by OciXCrom View Post
Awesome plugin. I see this being widely used. So, here is some feedback:

-------------------------------------- [ 1 ] --------------------------------------

Code:
#define TASK_INV        4562 #define TASK_DISPLAY       4563 #define TASK_HIDE_ENTS    4564

This is a big 'no' and is likely the reason for the issue in the previous comment.
Unique task ids should have a difference of at least 32 between them - the maximum number of players.

I understand only the first one is being combined with player ids, but this will still cause issues. For example:

Player with id #1 has a TASK_INV of 4562+1=4563 which is equal to TASK_DISPLAY, player #2's task is equal to TASK_HIDE_ENTS, etc, so when interacting with the player's TASK_INV tasks, you can accidentally interact with one of the other tasks.

The simple solution:

Code:
enum (+= 32) {     TASK_INV = 4562,     TASK_DISPLAY,     TASK_HIDE_ENTS }

-------------------------------------- [ 2 ] --------------------------------------

Your plugin won't compile under 1.8.2 because MAX_PLAYERS is not defined.

Code:
#if !defined MAX_PLAYERS const MAX_PLAYERS = 32 #endif

-------------------------------------- [ 3 ] --------------------------------------

I don't see a code that removes the sprites when the player disconnects?
Glad to hear that from you. You were right about all three suggestions and they are implemented. Disconnect forward removes the sprite immedietely (with the set_task it was removing later anyway).

Tested again online and tests were good with 20 players simultaneously. Not sure how the server will behave with 32/32. I highly recommend it to be used in servers with low players.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 03-02-2022 at 17:20.
EFFx is offline
SoulWeaver16
Senior Member
Join Date: May 2021
Location: Uruguay
Old 03-07-2022 , 16:38   Re: Show Teammates Armament
Reply With Quote #6

Hello, report here
I have stability problems with the server, the constant message on the console, is repeated in different periods of time

Consequently, the game freezes for 1 or 2 seconds, and the models end up underground.

And lastly, the arrow appears for the enemy side as well, maybe there could be one more cvar.
SoulWeaver16 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-08-2022 , 19:58   Re: Show Teammates Armament
Reply With Quote #7

Updated to v1.1:

- Fixed sprites floating.
- Fixed wrong sprites displaying for players.
- Fixed some overflow regarding the display of sprites when se_show_arrow_only is 1.

- Changed the way of how the sprites gets displayed, removing the delay for each player.

- Added se_show_arrow_only_mode cvar that controls which arrow players will be able to see (both teams, teammates only or only enemy team only).
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 03-08-2022 at 22:12.
EFFx is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-27-2022 , 15:58   Re: Show Teammates Armament
Reply With Quote #8

Updated to v1.2: Until now, it seems like a stable version, no issues were reported in all my tests with the plugin.

- Had some people telling me about crashes when testing with 32/32 bots, added a loop split so the server doesn't suffer that much displaying a LOT of sprites at once.
- Besides that loop split, there is also a code that doesn't allow the call of some natives again since the only thing that changes is the frame and the sprites' size.
- Tested with 32/32 bots and no crashes were happening with me anymore, still needs confirmations on public servers.

- Now the positions of the sprites is rightly set.
- Now the arrow position is fixed when the user is crouched.
- Now there is se_sprites_scale cvar that controls the sprites size.
- Now there is a cvar for each sprite that controls their colors individually:

se_sprite_color_weapons = default yellow
se_sprite_color_money = default green
se_sprite_color_grenades = default white (tried each grenade color individually, no pattern and combinations looks good, so by default all of them are the same color)
se_sprite_color_vesthelm = default purple
se_sprite_color_kevlar = default pink
se_sprite_color_arrow = default yellow
se_sprite_color_c4 = default orange
se_sprite_color_defusekit = default green
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 03-27-2022 at 21:43.
EFFx is offline
Siska1
Senior Member
Join Date: Feb 2020
Location: BedRock
Old 03-27-2022 , 17:40   Re: Show Teammates Armament
Reply With Quote #9

Here I want to ask whether it is possible for this plugin to work for only a short time at the beginning of each round within the time of purchase?
Siska1 is offline
Send a message via Skype™ to Siska1
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 03-27-2022 , 17:57   Re: Show Teammates Armament
Reply With Quote #10

Quote:
Originally Posted by Siska1 View Post
Here I want to ask whether it is possible for this plugin to work for only a short time at the beginning of each round within the time of purchase?
I offered EFFx money to do exactly the same thing you said but he rejected. Cruel world we live in
bigdaddy424 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 17:52.


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