Raised This Month: $ Target: $400
 0% 

Help with hidefrags


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-17-2012 , 12:28   Help with hidefrags
Reply With Quote #1

Hello,

I've found this plugin on the web
PHP Code:
/*    Formatright © 2009, ConnorMcLeod

    Hide T Frags is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Hide T Frags; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <cstrike>

new const VERSION[] = "0.1.0"

const MAX_PLAYERS 32

enum 
/*_:DeathMsg_Structure*/
{    
    
DeathMsg_KillerID 1// byte
    
DeathMsg_VictimID// byte
    
DeathMsg_IsHeadshot// byte
    
DeathMsg_TruncatedWeaponName // string
}

new 
g_iMaxPlayers
#define IsPlayer(%1)    ( 1 <= %1 <= g_iMaxPlayers )

new g_pCvarHideType
new g_iDeathMsg

public plugin_init()
{
    
register_plugin("Hide T Frags"VERSION"ConnorMcLeod")

    
g_pCvarHideType register_cvar("jb_hide_te_frags""1"// 0:inactive, 1:hide killer, 2:hide frag

    
g_iDeathMsg get_user_msgid("DeathMsg")
    
register_message(g_iDeathMsg"Message_DeathMsg")

    
g_iMaxPlayers get_maxplayers()
}

public 
Message_DeathMsg()
{
    new 
KillerID get_msg_arg_intDeathMsg_KillerID )
    if( 
IsPlayerKillerID ) && cs_get_user_teamKillerID ) == CS_TEAM_T )
    {
        switch( 
get_pcvar_numg_pCvarHideType ) )
        {
            case 
1:
            {
                
set_msg_arg_int(DeathMsg_KillerIDARG_BYTEget_msg_arg_intDeathMsg_VictimID ))
            }
            case 
2:
            {
                return 
PLUGIN_HANDLED
            
}
            case 
3:
            {
                new 
iPlayers[MAX_PLAYERS], iNumidszTruncatedWeaponName[16]
                
get_players(iPlayersiNum"ch")
                
get_msg_arg_string(DeathMsg_TruncatedWeaponNameszTruncatedWeaponNamecharsmax(szTruncatedWeaponName))
                for(new 
ii<iNumi++)
                {
                    
id iPlayers[i]
                    if( 
cs_get_user_team(id) == CS_TEAM_T )
                    {
                        
message_begin(MSG_ONEg_iDeathMsg, .player=id)
                        {
                            
write_byte(KillerID)
                            
write_byteget_msg_arg_intDeathMsg_VictimID ) )
                            
write_byteget_msg_arg_intDeathMsg_IsHeadshot ) )
                            
write_string(szTruncatedWeaponName)
                        }
                        
message_end()
                    }
                }
                return 
PLUGIN_HANDLED
            
}
        }
    }
    return 
PLUGIN_CONTINUE

But how can i hide the Frags only for CT and T's can see everything.

Like now it just hides every T's frag
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-17-2012 , 12:30   Re: Help with hidefrags
Reply With Quote #2

check this line
PHP Code:
if( IsPlayerKillerID ) && cs_get_user_teamKillerID ) == CS_TEAM_T 
and this one
PHP Code:
if( cs_get_user_team(id) == CS_TEAM_T 

Last edited by EpicMonkey; 04-17-2012 at 12:30.
EpicMonkey is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-17-2012 , 12:40   Re: Help with hidefrags
Reply With Quote #3

No i mean, hide all the frags for Ct's and show all the frags for terrorist, for example terrorist can see who killed who, ct's cant see anything.
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-17-2012 , 14:10   Re: Help with hidefrags
Reply With Quote #4

shouldnt this be in suggestions / requests?
EpicMonkey is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-17-2012 , 14:14   Re: Help with hidefrags
Reply With Quote #5

No, i just need help with it
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-17-2012 , 16:32   Re: Help with hidefrags
Reply With Quote #6

the script you posted above , hides frags from T's and shows it for CT?
EpicMonkey 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 07:47.


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