Skip to content

Commit

Permalink
First Release
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulmore committed Jan 9, 2024
1 parent aae771f commit 91cc991
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
# CS_1.6___Crosshair_Player_Info
You will see player's info under crosshair after aiming on him.
# CS 1.6 - Crosshair Player Info
You can see a player's nickname, remaining HP and remaining Armor under crosshair after aiming on him.

# Installation
- Just download the plugin and upload the .amxx file to your plugins folder on your server (or you can of course compile the .sma file and then upload the compilated .amxx file to your server).

# CVARs
`info_colored`
```
Possible values:
1 = Team Color
0 = Green Color (default)
```

# Support
If you having any issues please feel free to write your issue to the issue section :) .
Binary file added crosshair_player_info.amxx
Binary file not shown.
33 changes: 33 additions & 0 deletions crosshair_player_info.sma
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <amxmodx>
#include <amxmisc>

new g_iSyncHud

public plugin_init()
{
register_plugin( "Show Player Status", "1.0", "sakulmore" )

g_iSyncHud = CreateHudSyncObj();

register_event( "StatusValue", "show_info", "be", "1=2", "2!0" )
register_event( "StatusValue", "hide_info", "be", "1=1", "2=0" )
}
public show_info( id )
{
if( is_user_connected( id ) )
{
new player = read_data( 2 )
new name[ 32 ]
get_user_name( player, name, charsmax( name ) )
if( is_user_alive( player ) )
{
set_hudmessage( 25, 200, 11, -1.0, 0.53, 0, 1.0, 2.1, 0.0, 0.0, -1 )
ShowSyncHudMsg( id, g_iSyncHud, "%s^nHealth: %d%% | Armor: %d%%", name, get_user_health( player ), get_user_armor( player ) )
}
}
}
public hide_info( id )
{
if( is_user_connected( id ) )
ClearSyncHud( id, g_iSyncHud )
}

0 comments on commit 91cc991

Please sign in to comment.