Raised This Month: $105 Target: $400
 26% 

Health & Armor in Scoreboard


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Statistical        Approver:   Hawk552 (427)
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-16-2009 , 15:09   Health & Armor in Scoreboard
Reply With Quote #1

Description:

This plugin show the Health & Armor of the players in the scoreboard instead of Frags & Deaths. This plugin is usefull for Servers with a GamePlay that the frags and deaths doesn't matter. For example Surf, KZ, and others. So you can see the health and armor of the other players.

Note:

I tested with bots and work perfect (i think, for real players have to work perfect too). About "Modification" i seted in "All" but i don't know... i only play CS... i am not sure but maybe will be work on other mods... the plugin only use Fakemeta module.

Commands & Cvars:

For now... the plugin don't have commands or cvars... but well, maybe will be have... if i add something new to the plugin.
  • has_msg_on (Default: 1)
    • 0: Disable the message that tell about the new gameplay
    • 1: Enable the msg.
  • has_msg_delay (Default: 180.0)
    • Time between each message in seconds (180.0 = 3 minuts).
Extra note:

In the version 1.4 i added a new "feature". If you have more health than "X" number (1000 default) automatically is seted new "permanent" frags & deaths (1337 default). This is good for server that have some maps with a health machine, becouse if you have something more than 30.000 frags you get a negative number. So now, that doesn't happen... if you get more than 1000 frags, frags will be seted to 1337. Ofcourse you can change this two value. How? Well, go to the sma and in the top of the plugin you will see:

Code:
#define MAX_FRAGS 1000 #define SET_FRAGS 1337

You only have to change the values to wathever you want.
Credits:
Changelog:
  • Version 1.0
    • First Release.
  • Version 1.1
    • Removed Fakemeta module.
    • Change the method to update Health & Armor instead of using FM_CmdStart.
    • Added a message for advice people about the new "gameplay".
    • Added new cvars for the msg.
  • Version 1.2
    • In v1.1 sometimes the update of the hp & ap doesn't work correctyle, now work perfect (thx connor)
    • Code optimization (thx connor)
    • Added support when player die, 0 hp & 0 ap.
    • Added colors to the boring adv message.
    • Ofcourse added Connor in the credits.
  • Version 1.3
    • get_user_msgid("SayText")stored in a global variable.
    • deleted "connected" check in chat_color stock.
  • Version 1.4
    • Changed some things in the chat_color stock (thx connor another time).
    • Added two defines to set "X" frags & deaths when the player have more than "X" of health (see extra note).
P.S: Sry if i writed something wrong... correct me if i did it... My english isn't perfect.
Attached Files
File Type: sma Get Plugin or Get Source (health_armor_scoreboard.sma - 3621 views - 2.4 KB)
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 09-21-2009 at 08:16.
Alucard^ is offline
Send a message via Skype™ to Alucard^
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-16-2009 , 15:11   Re: Health & Armor in Scoreboard
Reply With Quote #2

FM_CmdStart ?! Omg..
__________________
xPaw is offline
Jay-izi
Senior Member
Join Date: Mar 2008
Location: Estonia Tallinn
Old 09-16-2009 , 15:17   Re: Health & Armor in Scoreboard
Reply With Quote #3

Good job!
But doesn't these
Code:
if( is_user_connected(i) )
  {
    if( !is_user_alive(i) )
      {
must be like that?

Code:
if( is_user_connected(i) && !is_user_alive(i) )
  {
__________________


Last edited by Jay-izi; 09-16-2009 at 15:23.
Jay-izi is offline
Send a message via ICQ to Jay-izi Send a message via MSN to Jay-izi Send a message via Skype™ to Jay-izi
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-16-2009 , 15:21   Re: Health & Armor in Scoreboard
Reply With Quote #4

Quote:
Originally Posted by Jay-izi View Post
Good job!
But doesn't these
Code:
if( is_user_connected(i) )
  {
    if( !is_user_alive(i) )
      {
must be like that?

Code:
if( is_user_connected(i) && is_user_alive(i) )
  {
No. he makes 0 - 0 for deadies.
__________________
xPaw is offline
Jay-izi
Senior Member
Join Date: Mar 2008
Location: Estonia Tallinn
Old 09-16-2009 , 15:24   Re: Health & Armor in Scoreboard
Reply With Quote #5

Sorry, a little typo.
I meant !is_user_alive(i)
__________________

Jay-izi is offline
Send a message via ICQ to Jay-izi Send a message via MSN to Jay-izi Send a message via Skype™ to Jay-izi
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 09-16-2009 , 15:25   Re: Health & Armor in Scoreboard
Reply With Quote #6

Good Job!
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-16-2009 , 15:42   Re: Health & Armor in Scoreboard
Reply With Quote #7

You are all wrong, hook ScoreInfo and replace arguments with health and armor.
CmdStart is called hundred times per seconds.
__________________
- tired and retired -
ConnorMcLeod is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-16-2009 , 15:53   Re: Health & Armor in Scoreboard
Reply With Quote #8

Quote:
Originally Posted by Jay-izi View Post
Sorry, a little typo.
I meant !is_user_alive(i)
If i do:

PHP Code:
if(is_user_connected(i) && !is_user_alive(i) ) 
Then, how can i do when the user is connected but is alive? Maybe with:

PHP Code:
else if(is_user_alive(i) ) 
But, is the same o.o

@xPaw

What happen with FM_CmdStart?

Is a bad method? =(

I tried with a lot of others methods but had a lot of bugs... see how i tried clicking the links in the Credits.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-16-2009 , 15:56   Re: Health & Armor in Scoreboard
Reply With Quote #9

Quote:
What happen with FM_CmdStart?

Is a bad method? =(
Quote:
Originally Posted by ConnorMcLeod View Post
You are all wrong, hook ScoreInfo and replace arguments with health and armor.
CmdStart is called hundred times per seconds.
__________________
Arkshine is offline
Fraancooo-.
BANNED
Join Date: Aug 2009
Location: CLICK HERE
Old 09-16-2009 , 16:10   Re: Health & Armor in Scoreboard
Reply With Quote #10

Good Job!
Fraancooo-. is offline
Send a message via MSN to Fraancooo-.
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 04:19.


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