Raised This Month: $51 Target: $400
 12% 

Removing "DEAD" flag on scoreboard (CS)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ricky
Senior Member
Join Date: Jul 2005
Old 11-18-2015 , 18:18   Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #1

Is there a script out there that does this?
Ricky is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-18-2015 , 18:29   Re: Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #2

This is client-side and cannot be done using a plugin.
__________________
Bugsy is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 11-18-2015 , 18:33   Re: Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #3

not really. You can just send ScoreAttrib message.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-18-2015 , 18:52   Re: Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #4

Untested, but should work I guess
PHP Code:
#include <amxmodx>

#pragma semicolon 1

new PLUGIN[]  = "";
new 
AUTHOR[]  = "";
new 
VERSION[] = "0.00";

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_message(get_user_msgid("ScoreAttrib"), "msgScoreAttrib");
}

public 
msgScoreAttrib(message_idmessage_destid)
{
    
set_msg_arg_int(2ARG_LONGget_msg_arg_int(2) & ~(<< 0));

With that code, no player will ever have "DEAD" as status on scoreboard.
klippy is offline
Ricky
Senior Member
Join Date: Jul 2005
Old 11-18-2015 , 20:18   Re: Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #5

Quote:
Originally Posted by KliPPy View Post
Untested, but should work I guess
PHP Code:
#include <amxmodx>

#pragma semicolon 1

new PLUGIN[]  = "";
new 
AUTHOR[]  = "";
new 
VERSION[] = "0.00";

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_message(get_user_msgid("ScoreAttrib"), "msgScoreAttrib");
}

public 
msgScoreAttrib(message_idmessage_destid)
{
    
set_msg_arg_int(2ARG_LONGget_msg_arg_int(2) & ~(<< 0));

With that code, no player will ever have "DEAD" as status on scoreboard.
Thanks for attempting this. Compiles fine but doesn't work.
Ricky is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-19-2015 , 16:09   Re: Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #6

Well, not sure if this is the best way, but i used this in a surf server before and worked fine
Attached Files
File Type: sma Get Plugin or Get Source (surf_score.sma - 620 views - 495 Bytes)
Jhob94 is offline
Ricky
Senior Member
Join Date: Jul 2005
Old 11-19-2015 , 21:15   Re: Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #7

Quote:
Originally Posted by Jhob94 View Post
Well, not sure if this is the best way, but i used this in a surf server before and worked fine
Thanks for sharing! This works but also removes "BOMB" or "VIP" status as well.
Ricky is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-20-2015 , 10:18   Re: Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
This is client-side and cannot be done using a plugin.
You can hide or alter the scoreboard flags with ScoreAttrib message(check https://wiki.alliedmods.net/Half-Lif...ts#ScoreAttrib).

PHP Code:
#include <amxmodx>
#include <hamsandwich>

new gmsgScoreAttrib

public plugin_init()
{
    
RegisterHam(Ham_Killed"player""CBasePlayer_Killed"true)
    
    
gmsgScoreAttrib get_user_msgid("ScoreAttrib")
}

public 
CBasePlayer_Killed(Victim)
{
    if(
is_user_connected(Victim))
    {
        
message_begin(MSG_ALLgmsgScoreAttrib)
        {
            
write_byte(Victim)
            
write_byte(0)
            
message_end()
        }
    }

@OP, try this.
__________________
HamletEagle is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-20-2015 , 21:14   Re: Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
You can hide or alter the scoreboard flags with ScoreAttrib message(check https://wiki.alliedmods.net/Half-Lif...ts#ScoreAttrib).
Lol, duh, I think that has been established. But hooking the message and altering it doesn't seem to work consistently like you would expect; it would either hide everything or not work at all. Your method seems to work, but I wonder if the message will be sent again eventually and clear out what you set when the player died.

Here is what would be best, if it would work. So if any future messages are sent to update the score board, it would reflect correctly.
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_messageget_user_msgid"ScoreAttrib" ) , "msgScoreAttrib" );
}

public 
msgScoreAttrib(message_idmessage_destid)
{
    if ( !
is_user_aliveget_msg_arg_int) ) )
        
set_msg_arg_intARG_BYTE );

__________________

Last edited by Bugsy; 11-20-2015 at 21:14.
Bugsy is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-21-2015 , 04:27   Re: Removing "DEAD" flag on scoreboard (CS)
Reply With Quote #10

Could it be that my code wasn't working properly because I put ARG_LONG instead of ARG_BYTE? I just saw that the second argument is of byte type. Oh well.
klippy 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 09:36.


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