AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Health & Armor in Scoreboard (https://forums.alliedmods.net/showthread.php?t=103809)

Alucard^ 09-16-2009 14:09

Health & Armor in Scoreboard
 
1 Attachment(s)
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.

xPaw 09-16-2009 14:11

Re: Health & Armor in Scoreboard
 
FM_CmdStart ?! Omg..

Jay-izi 09-16-2009 14:17

Re: Health & Armor in Scoreboard
 
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) )
  {


xPaw 09-16-2009 14:21

Re: Health & Armor in Scoreboard
 
Quote:

Originally Posted by Jay-izi (Post 934981)
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.

Jay-izi 09-16-2009 14:24

Re: Health & Armor in Scoreboard
 
Sorry, a little typo.
I meant !is_user_alive(i) :mrgreen:

#8 SickneSS 09-16-2009 14:25

Re: Health & Armor in Scoreboard
 
Good Job!

ConnorMcLeod 09-16-2009 14:42

Re: Health & Armor in Scoreboard
 
You are all wrong, hook ScoreInfo and replace arguments with health and armor.
CmdStart is called hundred times per seconds.

Alucard^ 09-16-2009 14:53

Re: Health & Armor in Scoreboard
 
Quote:

Originally Posted by Jay-izi (Post 934995)
Sorry, a little typo.
I meant !is_user_alive(i) :mrgreen:

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.

Arkshine 09-16-2009 14:56

Re: Health & Armor in Scoreboard
 
Quote:

What happen with FM_CmdStart?

Is a bad method? =(
Quote:

Originally Posted by ConnorMcLeod (Post 935025)
You are all wrong, hook ScoreInfo and replace arguments with health and armor.
CmdStart is called hundred times per seconds.


Fraancooo-. 09-16-2009 15:10

Re: Health & Armor in Scoreboard
 
Good Job!


All times are GMT -4. The time now is 05:55.

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