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

Solved [TF2] Cleaner's Carbine Crikey Meter


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ravrob
Junior Member
Join Date: Oct 2019
Location: The Ice
Old 11-13-2020 , 18:56   [TF2] Cleaner's Carbine Crikey Meter
Reply With Quote #1

So I've been trying to make a script that will do something when the player activates their Crikey meter using the Cleaner's Carbine, however I can't seem to figure out what the meter itself is using. m_flRageMeter and m_flHypeMeter don't seem to be present and m_flChargeMeter m_flItemChargeMeter and m_flEnergyDrinkMeter are all present on the weapon at a static 100. If anyone could tell me what it is or even how to find the property, as that confuses me even more, I would be very grateful.

Last edited by Ravrob; 11-15-2020 at 01:17.
Ravrob is offline
StrikeR14
AlliedModders Donor
Join Date: Apr 2016
Location: Behind my PC
Old 11-14-2020 , 10:42   Re: [TF2] Cleaner's Carbine Crikey Meter
Reply With Quote #2

Quote:
Originally Posted by Ravrob View Post
do something when the player activates their Crikey meter using the Cleaner's Carbine
PHP Code:
public void TF2_OnConditionAdded(int clientTFCond condition)
{
    if(
condition == TFCond_CritCola)
    {
        
int iWeapon GetEntPropEnt(clientProp_Send"m_hActiveWeapon");
        if(!
IsValidEntity(iWeapon)) 
            return;

        
int index GetEntProp(iWeaponProp_Send"m_iItemDefinitionIndex");
        if(
index == 751// The Cleaner's Carbine definition index
        
{
            
// code
        
}
    }

__________________
Currently taking TF2/CSGO paid private requests!

My Plugins | My Discord Account

Last edited by StrikeR14; 11-14-2020 at 11:17. Reason: Code fix
StrikeR14 is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 11-14-2020 , 15:46   Re: [TF2] Cleaner's Carbine Crikey Meter
Reply With Quote #3

Cleaner's Carbine information from items_game.txt file:

PHP Code:
        "751"
        
{
            
"name" "The Cleaner's Carbine"
            "first_sale_date"    "2012/06/27"
            "baseitem" "0"
            "propername"    "1"
            "item_class"    "tf_weapon_charged_smg"
            "craft_class"    "weapon"
            "craft_material_type"    "weapon"
            "capabilities"
            
{
                
"nameable"        "1"
                "can_craft_count"    "1"
            
}
            
"tags"
            
{
                
"can_deal_damage"            "1"
                "can_deal_critical_damage"    "1"
                "can_deal_mvm_penetration_damage"    "1"
                "can_deal_long_distance_damage"    "1"
            
}
            
"item_logname"    "pro_smg"
            "item_iconname"    "pro_smg"
            "item_type_name"    "#TF_Weapon_SMG"
            "item_name"    "#TF_Pro_SMG"
            "item_description"    "#TF_Pro_SMG_Desc"
            "item_slot"    "secondary"
            "item_quality"        "unique"
            "min_ilevel"    "1"
            "max_ilevel"    "1"
            "image_inventory"    "backpack/workshop/weapons/c_models/c_pro_smg/c_pro_smg"
            "image_inventory_size_w"        "128"
            "image_inventory_size_h"        "82"
            "model_player"    "models/workshop/weapons/c_models/c_pro_smg/c_pro_smg.mdl"
            "attach_to_hands"    "1"
            "attributes"
            
{
                
"fire rate penalty"
                
{
                    
"attribute_class"    "mult_postfiredelay"
                    "value" "1.25"
                
}
                
"clip size penalty"
                
{
                    
"attribute_class"    "mult_clipsize"
                    "value"    "0.80"
                
}
                
"crit mod disabled"
                
{
                    
"attribute_class"    "mult_crit_chance"
                    "value"    "0"
                
}
                
"minicrit_boost_charge_rate"
                
{
                    
"attribute_class" "minicrit_boost_charge_rate"
                    "value" "1"
                
}
                
"minicrit_boost_when_charged"
                
{
                    
"attribute_class" "minicrit_boost_when_charged"
                    "value" "8"
                
}
            }
            
"used_by_classes"
            
{
                
"sniper"    "1"
            
}
            
"static_attrs"
            
{
                
"min_viewmodel_offset"                    "10 0 -7"                            
            
}
            
"visuals"
            
{
                
"sound_single_shot"    "Weapon_UrbanProfessional.Single"
                "sound_burst"        "Weapon_UrbanProfessional.SingleCrit"
            
}
            
"mouse_pressed_sound"    "ui/item_light_gun_pickup.wav"
            "drop_sound"        "ui/item_light_gun_drop.wav"
        

Maybe use these two attributes with your meter? "minicrit_boost_charge_rate" and "minicrit_boost_when_charged". I'm just guessing since I don't know what you are trying to accomplish.
PC Gamer is offline
Ravrob
Junior Member
Join Date: Oct 2019
Location: The Ice
Old 11-15-2020 , 01:15   Re: [TF2] Cleaner's Carbine Crikey Meter
Reply With Quote #4

Quote:
Originally Posted by StrikeR14 View Post
PHP Code:
public void TF2_OnConditionAdded(int clientTFCond condition)
{
    if(
condition == TFCond_CritCola)
    {
        
int iWeapon GetEntPropEnt(clientProp_Send"m_hActiveWeapon");
        if(!
IsValidEntity(iWeapon)) 
            return;

        
int index GetEntProp(iWeaponProp_Send"m_iItemDefinitionIndex");
        if(
index == 751// The Cleaner's Carbine definition index
        
{
            
// code
        
}
    }

Yup that works too thanks, suppose I was trying to over complicate things.
Ravrob is offline
Ravrob
Junior Member
Join Date: Oct 2019
Location: The Ice
Old 11-15-2020 , 01:16   Re: [TF2] Cleaner's Carbine Crikey Meter
Reply With Quote #5

Quote:
Originally Posted by PC Gamer View Post
Cleaner's Carbine information from items_game.txt file:
Maybe use these two attributes with your meter? "minicrit_boost_charge_rate" and "minicrit_boost_when_charged". I'm just guessing since I don't know what you are trying to accomplish.
All I was really looking for was the netprop used with the meter, thanks anyways.
Ravrob 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 17:39.


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