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

Apply On ADMFLAG_CUSTOM6


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ApoziX
Member
Join Date: Sep 2018
Old 12-25-2019 , 18:48   Apply On ADMFLAG_CUSTOM6
Reply With Quote #1

Hey I want that to apply only on admflag_custom6 +rep for helpers
PHP Code:
#include <sourcemod>
#include <tf2>

new Handle:crits INVALID_HANDLE;
new 
Handle:chance INVALID_HANDLE;

#define PLUGIN_VERSION "0.1"

public Plugin:myinfo 
{
    
name "SM Crits chance",
    
author "pRED*",
    
description "Change critical hit %",
    
version PLUGIN_VERSION,
    
url "http://www.sourcemod.net/"
};

public 
OnPluginStart()
{
    
crits CreateConVar("sm_crits_enabled""1");
    
chance CreateConVar("sm_crits_chance""1.00");
    
    
CreateConVar("sm_crits_version"PLUGIN_VERSION"Crits Version"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
}


public 
Action:TF2_CalcIsAttackCritical(clientweaponString:weaponname[], &bool:result)
{
    if (!
GetConVarBool(crits))
    {
        return 
Plugin_Continue;    
    }
    
    if (
GetConVarFloat(chance) > GetRandomFloat(0.01.0))
    {
        
result true;
        return 
Plugin_Handled;    
    }
    
    
result false;
    
    return 
Plugin_Handled;

__________________
Looking To Start A TF2 Community
My Discord | My Steam
ApoziX is offline
 



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 06:32.


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