Raised This Month: $32 Target: $400
 8% 

zp knockback


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nunuxer
Junior Member
Join Date: Jan 2021
Old 02-13-2021 , 07:23   zp knockback
Reply With Quote #1

Hello ! I have a problem with the zombie classes knockback. I want to give them less knockback, I modified the .sma code but it's the same. Can anyone help me ?

Class .sma

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombie_plague_special>
#include <zombiexp>

#define PLUGIN "[ZP] Class : Healing Zombie"
#define VERSION "1.0.6"
#define AUTHOR "Fry!"

new const zclass_name[] = "Regenerator"
new const zclass_info[] = "\rYou regenerate your health"
new const zclass_model[] = "zombie_source_lvl1"
new const zclass_clawmodel[] = "v_hl_zm_04.mdl"
const zclass_health 1750
const zclass_speed 350
const Float:zclass_gravity 0.90
const Float:zclass_knockback 0.60
const zclass_level // level required to use

new g_zclass_healingg_healing_delayg_healing_amount
new Float:g_heal_delay[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_cvar("zp_zclass_healing_zombie",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
    
    
g_healing_delay register_cvar("zp_healing_zombie_delay""2.0")
    
g_healing_amount register_cvar("zp_healing_zombie_amount""130.0")
    
    
register_event("Damage""Damage""be")
    
    
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
}

public 
plugin_precache()
{
    
g_zclass_healing zpxp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockbackzclass_level)
}

public 
zp_user_infected_post(playerinfector)
{
    if (
zp_get_user_zombie_class(player) == g_zclass_healing)
        return 
PLUGIN_CONTINUE
        
    
return PLUGIN_CONTINUE
}

public 
Damage(victim)
{
    if (!
is_user_alive(victim) || !zp_get_user_zombie(victim))
        return 
PLUGIN_HANDLED
        
    
if (zp_get_user_zombie_class(victim) != g_zclass_healing)
        return 
PLUGIN_CONTINUE
    
    
static Float:g_gametime
    
    g_gametime 
get_gametime()
        
    
g_heal_delay[victim] = g_gametime get_pcvar_float(g_healing_delay)
    
    return 
PLUGIN_CONTINUE
}

public 
fw_PlayerPreThink(player)
{
    if (!
is_user_alive(player) || !zp_get_user_zombie(player))
        return 
FMRES_IGNORED
        
    
if (zp_get_user_zombie_class(player) != g_zclass_healing)
        return 
FMRES_IGNORED
        
    
static Float:g_gametimeFloat:g_health
    
    g_gametime 
get_gametime()
    
pev(playerpev_healthg_health)
    
    if (
g_health zclass_health && g_heal_delay[player] < g_gametime)
    {
        
set_pev(playerpev_healthg_health get_pcvar_float(g_healing_amount))
        
g_heal_delay[player] = g_gametime get_pcvar_float(g_healing_delay)
    }
    
    return 
FMRES_IGNORED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
zombie_plague_advanced.cfg

PHP Code:
zp_knockback 1 // Enable weapon knockback (note: pain shock free increases knockback effect)

zp_knockback_damage 0 // Use damage on knockback calculation

zp_knockback_power 1 // Use weapon power on knockback calculation

zp_knockback_zvel 1 // Should knockback affect vertical velocity

zp_knockback_ducking 1 // Knockback multiplier for crouched zombies [0-knockback disabled when ducking]

zp_knockback_distance 500 // Max distance for knockback to take effect

zp_knockback_nemesis 0.5 // Nemesis knockback multiplier [0-disable knockback for nemesis]

zp_knockback_assassin 0.5 // Assassin knockback multiplier [0-disable knockback for assassin] 
nunuxer is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 02-13-2021 , 08:47   Re: zp knockback
Reply With Quote #2

Edit zp_zombieclasses.ini. You can find the file in addons/amxmodx/configs
__________________








CrazY. is offline
nunuxer
Junior Member
Join Date: Jan 2021
Old 02-13-2021 , 10:04   Re: zp knockback
Reply With Quote #3

Quote:
Originally Posted by CrazY. View Post
Edit zp_zombieclasses.ini. You can find the file in addons/amxmodx/configs
I changed the class knockback first to 0.60, still the same then to 1.20, still the same:


PHP Code:
[Regenerator]
NAME Regenerator
INFO 
= \rYou regenerate your health
MODELS 
zombie_source_lvl1
CLAWMODEL 
v_hl_zm_04.mdl
HEALTH 
1750
SPEED 
350
GRAVITY 
0.90
KNOCKBACK 
1.20 
nunuxer is offline
nunuxer
Junior Member
Join Date: Jan 2021
Old 02-14-2021 , 09:57   Re: zp knockback
Reply With Quote #4

UP, someone ?
nunuxer is offline
Reply


Thread Tools
Display Modes

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:29.


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