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

Tons of Melee/Knife ability/boost requests


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
togera13
Junior Member
Join Date: Mar 2015
Location: California
Old 03-26-2015 , 20:34   Tons of Melee/Knife ability/boost requests
Reply With Quote #1

CS 1.6 and CSCZ
So here are some things I really want, and this is for normal CS not zombie plague but compatibility with that would be cool, anyways here are my requests.

In order of MOST wanted to LEAST wanted (Starting at top)

CVARs for all of the below things

Take far less bullet damage when holding a knife/melee

Jump higher with knife out

move faster with knife

reduced or no slowdown when being shot while holding knife

Faster crouch walk speed with knife

leaping ability while holding knife (to close the gap between you and your prey)

change left click primary knife attack (damage multiplier?)

change right click secondary knife attack (damage multiplier?)

flinch less while holding knife

heal slowly while holding a knife

Backstabs (nuff said)

Make these player specific? (Not required but it would allow for some things making it by steamID and Admin only)


I really need CVARs for all of these so I can change their values to my liking

And yes I know there is a plugin for knife jump height but it's for zombie plague im trying to play Original/Normal CS

Last edited by togera13; 03-26-2015 at 21:52. Reason: *added somethings* CS 1.6
togera13 is offline
Send a message via Skype™ to togera13
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 03-27-2015 , 05:33   Re: Tons of Melee/Knife ability/boost requests
Reply With Quote #2

Non-tested, but compiled fine
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <fun>

#define PLUGIN "Knife Abilities"
#define VERSION "1.0001"
#define AUTHOR "S.M"

#define ADMIN_LEVEL ADMIN_ADMIN //Admin level to use knife abilities
#define LEAP_FORCE 550 //Some leap stuff, don't change if you're not sure about it
#define LEAP_HEIGHT 255

#define TASK_HEAL 202 //Don't change this

const velocity_modifier 108 //thanks to ConnorMcLeod

new g_cvar_reducedmgg_cvar_gravityg_cvar_speedg_cvar_painshockfreeg_cvar_dmgmulg_cvar_healg_cvar_leap
new g_holding_knife[32]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
g_cvar_reducedmg register_cvar("ka_reducedmg""0.5"//How much damage will be taken when you hold knife
    
g_cvar_gravity register_cvar("ka_knifegravity""0.5"//Gravity multiplier when holding knife
    
g_cvar_speed register_cvar("ka_knifespeed""400"//Speed when holding knife
    
g_cvar_painshockfree register_cvar("ka_painshockfree""1"//Pain shock free when holding knife? 1/0 = on/off
    
g_cvar_dmgmul register_cvar("ka_dmg""5"//Knife damage multiplier
    
g_cvar_heal register_cvar("ka_heal""2"//Heal HP/s when holding a knife
    
g_cvar_leap register_cvar("ka_leap""1"//Leap enable or not? 1/0
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
register_event("CurWeapon""Event_CurWeapon""be""1=1")
    
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
}
public 
Event_CurWeapon(id)
{
    if(
is_user_connected(id))
    {
        if(
get_user_flags(id) & ADMIN_LEVEL)
        {
            new 
weapon read_data(2)
            if(
weapon == CSW_KNIFE)
            {
                
g_holding_knife[id] = true
                set_user_gravity
(idget_pcvar_float(g_cvar_gravity))
                
set_user_maxspeed(idget_pcvar_float(g_cvar_speed))
                if(
get_pcvar_num(g_cvar_heal))
                    
set_task(1.0"knife_heal"id+TASK_HEAL__"b")
            }
            else
            {
                
g_holding_knife[id] = false
                set_user_gravity
(id1.0)
                
remove_task(id+TASK_HEAL)
            }
        }
    }
}
public 
fw_TakeDamage(victiminflictorattackerFloatdamage)
{
    if(
is_user_connected(victim) && is_user_connected(attacker))
    {
        if(
g_holding_knife[victim])
        {
            
SetHamParamFloat(4damage get_pcvar_float(g_cvar_reducedmg))
            if(
get_pcvar_num(g_cvar_painshockfree))
                
set_pdata_float(victimvelocity_modifier1.0)
        }
        if(
g_holding_knife[attacker])
        {
            
SetHamParamFloat(4damage get_pcvar_float(g_cvar_dmgmul))
        }
    }
}
public 
knife_heal(id)
{
    if(
is_user_connected(id))
        
set_user_health(idget_user_health(id) + get_pcvar_num(g_cvar_heal))
}
leap_longjump(id//Thanks to iNspiratioN for this xD
{
    if (!
get_pcvar_num(g_cvar_leap))
        return 
false
    
if (!(pev(idpev_flags) & FL_ONGROUND) || fm_get_speed(id) < 80)
        return 
false
    
static buttons
    buttons 
pev(idpev_button)
    if (!
is_user_bot(id) && (!(buttons IN_JUMP) || !(buttons IN_DUCK)))
        return 
false
    
return true
}
stock fm_get_speed(entity)
{
    static 
Float:velocity[3]
    
pev(entitypev_velocityvelocity)
    return 
floatround(vector_length(velocity))
}
public 
fw_PlayerPreThink(id)
{
    if (!
is_user_alive(id))
        return 
FMRES_IGNORED
    
if (leap_longjump(id))
    {
        static 
Float:velocity[3]
        
velocity_by_aim(idLEAP_FORCEvelocity)
        
velocity[2] = LEAP_HEIGHT
        set_pev
(idpev_velocityvelocity)
    }
    return 
FMRES_IGNORED

This have almost all of your request except these:
Quote:
flinch less while holding knife
sorry but I don't understand what is this
Quote:
Backstabs (nuff said)
Backstab has more damage already, so I guess I don't have to do this
__________________

Last edited by Shiina.Mashiro; 03-27-2015 at 05:41. Reason: improve code
Shiina.Mashiro is offline
togera13
Junior Member
Join Date: Mar 2015
Location: California
Old 03-27-2015 , 13:49   Re: Tons of Melee/Knife ability/boost requests
Reply With Quote #3

Ignore flinch and backstabs I was talking about the slowdown from getting shot which I accidentally said it twice(and you added it already) and I forgot backstabs are already in the game basicly

The only problem im having now is Podbots are moving like sonic the hedgehog now (even without holding knife) and I don't think my server recognizes me as a admin cause I probably didn't add myself correctly

Btw Thank you for being so fast and adding all those things so quickly

-edit hmm I can leap but all the special effects besides that don't work on me only the bots
im going to upload a video in a bit cause this is hilarious and somewhat fun I actually got a knife kill XD

Last edited by togera13; 03-27-2015 at 14:19. Reason: some readability issues
togera13 is offline
Send a message via Skype™ to togera13
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 03-28-2015 , 10:08   Re: Tons of Melee/Knife ability/boost requests
Reply With Quote #4

Quote:
Originally Posted by togera13 View Post
Ignore flinch and backstabs I was talking about the slowdown from getting shot which I accidentally said it twice(and you added it already) and I forgot backstabs are already in the game basicly

The only problem im having now is Podbots are moving like sonic the hedgehog now (even without holding knife) and I don't think my server recognizes me as a admin cause I probably didn't add myself correctly

Btw Thank you for being so fast and adding all those things so quickly

-edit hmm I can leap but all the special effects besides that don't work on me only the bots
im going to upload a video in a bit cause this is hilarious and somewhat fun I actually got a knife kill XD
Ty for ur respond
Unfortunately, I have some work to do on this weekend, so I can only help you for a few more days
Sorry for that ^^ I'll try to help you as soon as possible
__________________
Shiina.Mashiro is offline
togera13
Junior Member
Join Date: Mar 2015
Location: California
Old 03-30-2015 , 13:00   Re: Tons of Melee/Knife ability/boost requests
Reply With Quote #5

I don't care when its done I just care that it gets finished before its abandoned
take your time ty

abandoned = untouched for a month or more I think
__________________

Last edited by togera13; 03-31-2015 at 02:26. Reason: additional info
togera13 is offline
Send a message via Skype™ to togera13
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 03-31-2015 , 08:34   Re: Tons of Melee/Knife ability/boost requests
Reply With Quote #6

Ei sorry my bad, got a few bugs in my code
Tested this and works fine xD
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <fun>

#define PLUGIN "Knife Abilities"
#define VERSION "1.0001"
#define AUTHOR "S.M"

#define ADMIN_LEVEL ADMIN_KICK //Admin level to use knife abilities
#define LEAP_FORCE 550 //Some leap stuff, don't change if you're not sure about it
#define LEAP_HEIGHT 255

#define TASK_HEAL 202 //Don't change this

const velocity_modifier 108 //thanks to ConnorMcLeod

new g_cvar_reducedmgg_cvar_gravityg_cvar_speedg_cvar_painshockfreeg_cvar_dmgmulg_cvar_healg_cvar_leap
new g_holding_knife[32]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
g_cvar_reducedmg register_cvar("ka_reducedmg""0.5"//How much damage will be taken when you hold knife
    
g_cvar_gravity register_cvar("ka_knifegravity""0.5"//Gravity multiplier when holding knife
    
g_cvar_speed register_cvar("ka_knifespeed""400"//Speed when holding knife
    
g_cvar_painshockfree register_cvar("ka_painshockfree""1"//Pain shock free when holding knife? 1/0 = on/off
    
g_cvar_dmgmul register_cvar("ka_dmg""5"//Knife damage multiplier
    
g_cvar_heal register_cvar("ka_heal""2"//Heal HP/s when holding a knife
    
g_cvar_leap register_cvar("ka_leap""1"//Leap enable or not? 1/0
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
register_event("CurWeapon""Event_CurWeapon""be""1=1")
    
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
}
public 
Event_CurWeapon(id)
{
    if(
is_user_connected(id))
    {
        if(
get_user_flags(id) & ADMIN_LEVEL)
        {
            new 
weapon read_data(2)
            if(
weapon == CSW_KNIFE)
            {
                
g_holding_knife[id] = true
                set_user_gravity
(idget_pcvar_float(g_cvar_gravity))
                
set_user_maxspeed(idget_pcvar_float(g_cvar_speed))
                if(
get_pcvar_num(g_cvar_heal))
                    
set_task(1.0"knife_heal"id+TASK_HEAL__"b")
            }
            else
            {
                
g_holding_knife[id] = false
                set_user_gravity
(id1.0)
                
remove_task(id+TASK_HEAL)
            }
        }
    }
}
public 
fw_TakeDamage(victiminflictorattackerFloatdamage)
{
    if(
is_user_connected(victim) && is_user_connected(attacker))
    {
        if(
g_holding_knife[victim])
        {
            
SetHamParamFloat(4damage get_pcvar_float(g_cvar_reducedmg))
            if(
get_pcvar_num(g_cvar_painshockfree))
                
set_pdata_float(victimvelocity_modifier1.0)
        }
        if(
g_holding_knife[attacker])
        {
            
SetHamParamFloat(4damage get_pcvar_float(g_cvar_dmgmul))
        }
    }
}
public 
knife_heal(id)
{
    if(
is_user_connected(id))
        
set_user_health(idget_user_health(id) + get_pcvar_num(g_cvar_heal))
}
leap_longjump(id//Thanks to iNspiratioN for this xD
{
    if (!
get_pcvar_num(g_cvar_leap))
        return 
false
    
if (!(get_user_flags(id) & ADMIN_LEVEL))
        return 
false
    
if (!g_holding_knife[id])
        return 
false
    
if (!(pev(idpev_flags) & FL_ONGROUND) || fm_get_speed(id) < 80)
        return 
false
    
static buttons
    buttons 
pev(idpev_button)
    if (!
is_user_bot(id) && (!(buttons IN_JUMP) || !(buttons IN_DUCK)))
        return 
false
    
return true
}
stock fm_get_speed(entity)
{
    static 
Float:velocity[3]
    
pev(entitypev_velocityvelocity)
    return 
floatround(vector_length(velocity))
}
public 
fw_PlayerPreThink(id)
{
    if (!
is_user_alive(id))
        return 
FMRES_IGNORED
    
if (leap_longjump(id))
    {
        static 
Float:velocity[3]
        
velocity_by_aim(idLEAP_FORCEvelocity)
        
velocity[2] = LEAP_HEIGHT
        set_pev
(idpev_velocityvelocity)
    }
    return 
FMRES_IGNORED

__________________
Shiina.Mashiro is offline
togera13
Junior Member
Join Date: Mar 2015
Location: California
Old 03-31-2015 , 15:37   Re: Tons of Melee/Knife ability/boost requests
Reply With Quote #7

is it just me or is the website upside down Im taking a screenshot of this XD
http://imgur.com/hTaF8ys
http://imgur.com/MiBjEFg
http://imgur.com/tW9UZFi
__________________

Last edited by togera13; 03-31-2015 at 15:50. Reason: Proof XP
togera13 is offline
Send a message via Skype™ to togera13
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 04-01-2015 , 01:47   Re: Tons of Melee/Knife ability/boost requests
Reply With Quote #8

Quote:
Originally Posted by togera13 View Post
is it just me or is the website upside down Im taking a screenshot of this XD
http://imgur.com/hTaF8ys
http://imgur.com/MiBjEFg
http://imgur.com/tW9UZFi
It's April Fool's Day bro
__________________

Last edited by Shiina.Mashiro; 04-01-2015 at 01:48.
Shiina.Mashiro is offline
Kz1.0
Senior Member
Join Date: Jan 2013
Location: Vietnam
Old 04-01-2015 , 03:32   Re: Tons of Melee/Knife ability/boost requests
Reply With Quote #9

Quote:
Originally Posted by Shiina.Mashiro View Post
Ei sorry my bad, got a few bugs in my code
Tested this and works fine xD
PHP Code:
public knife_heal(taskid)
{
    new 
id taskid TASK_HEAL
    
if(is_user_connected(id))
        
set_user_health(idget_user_health(id) + get_pcvar_num(g_cvar_heal))

Kz1.0 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 01:50.


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