AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Is it possible to increase painshock? (https://forums.alliedmods.net/showthread.php?t=334654)

AnimalMonster 10-10-2021 20:51

Is it possible to increase painshock?
 
Title says it all

Bugsy 10-10-2021 21:05

Re: Is it possible to increase painshock?
 
Try this, it looks like 0.5 is default shock, 1.0 is no shock. If you want more than default shock, find a good value between 0.01 and 0.5.

set_pdata_float(id, m_flVelocityModifier, 1.0);

PHP Code:

/*    Copyright © 2009, ConnorMcLeod

    Pain Shock Free 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 Pain Shock Free; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Pain Shock Free"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

const m_flVelocityModifier 108;

new 
g_pCvarPainShockFree;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);

    
g_pCvarPainShockFree register_cvar("amx_painshockfree""1"FCVAR_SERVER);

    
RegisterHam(Ham_TakeDamage"player""OnCBasePlayer_TakeDamage_P"true);
}

public 
OnCBasePlayer_TakeDamage_P(id)
{
    if( 
get_pcvar_num(g_pCvarPainShockFree) )
    {
        
set_pdata_float(idm_flVelocityModifier1.0);
    }



AnimalMonster 10-11-2021 09:31

Re: Is it possible to increase painshock?
 
Thanks Bugsy!


All times are GMT -4. The time now is 10:39.

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