Resolved knockback factor on guns

Installation Problems Support
Rain1153
Senior Member
Senior Member
India
Posts: 277
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 18
Contact:

knockback factor on guns

#1

Post by Rain1153 » 10 Months Ago

Can we set knockback of default guns like in zp?
LOL

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 477
Joined: 2 Years Ago
Has thanked: 18 times
Been thanked: 1 time
Contact:

#2

Post by czirimbolo » 10 Months Ago

it would be nice if we could set something like this: higher level = more powerful knockback
Image

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1864
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 98 times
Age: 21
Contact:

#3

Post by Raheem » 10 Months Ago

Yes, you can search for any plugin that change weapons default knockback. It should work without problems with our Mod.
You don't know? Learn and you will know.

Rain1153
Senior Member
Senior Member
India
Posts: 277
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 18
Contact:

#4

Post by Rain1153 » 10 Months Ago

czirimbolo wrote:
10 Months Ago
it would be nice if we could set something like this: higher level = more powerful knockback
I can try it if i find that plugin

[ Post made via Android ]
LOL

Rain1153
Senior Member
Senior Member
India
Posts: 277
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 18
Contact:

#5

Post by Rain1153 » 10 Months Ago

But there is a default zm knockback factor on ze what about it?

[ Post made via Android ]
LOL

Rain1153
Senior Member
Senior Member
India
Posts: 277
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 18
Contact:

#6

Post by Rain1153 » 10 Months Ago

https://forums.alliedmods.net/showthread.php?t=165075
i tried this one well it worked when zm weren't released but when they were released! the knockback factors from ze.cfg was automatically used any fixes?
LOL

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1864
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 98 times
Age: 21
Contact:

#7

Post by Raheem » 10 Months Ago

The knockback we add is addtion to the original one, we don't replace old one by ours. Still based on weapons. You can try: ze_zombie_knockback 1.0

One more thing, in ze_core.sma you may need to remove this line: set_member(iVictim, m_flVelocityModifier, 1.0)

You can also at Fw_TakeDamage_Post() (ze_core.sma) remove the extra knockback.
You don't know? Learn and you will know.

Rain1153
Senior Member
Senior Member
India
Posts: 277
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 18
Contact:

#8

Post by Rain1153 » 10 Months Ago

didnt work
You can also at Fw_TakeDamage_Post() (ze_core.sma) remove the extra knockback. tried this then the normal mod came up lol
also i didnt get this
set_member(iVictim, m_flVelocityModifier, 1.0)
LOL

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1864
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 98 times
Age: 21
Contact:

#9

Post by Raheem » 10 Months Ago

If you need to disable the Mod knockback:

1. Go to ze_core.sma and then find:
    1. public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, bitsDamageType)
    2. {
    3.     // Not Vaild Victim or Attacker so skip the event (Important to block out bounds errors)
    4.     if (!is_user_connected(iVictim) || !is_user_connected(iAttacker))
    5.         return HC_CONTINUE
    6.    
    7.     // Set Knockback here, So if we blocked damage in TraceAttack event player won't get knockback (Fix For Madness)
    8.     if (g_bIsZombie[iVictim] && !g_bIsZombie[iAttacker])
    9.     {
    10.         // Remove Shock Pain
    11.         set_member(iVictim, m_flVelocityModifier, 1.0)
    12.        
    13.         // Set Knockback
    14.         static Float:flOrigin[3]
    15.         get_entvar(iAttacker, var_origin, flOrigin)
    16.         Set_Knockback(iVictim, flOrigin, get_pcvar_float(g_pCvarZombieKnockback), 2)
    17.     }
    18.    
    19.     return HC_CONTINUE
    20. }
Replace it with:
    1. public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, bitsDamageType)
    2. {
    3.     // Not Vaild Victim or Attacker so skip the event (Important to block out bounds errors)
    4.     if (!is_user_connected(iVictim) || !is_user_connected(iAttacker))
    5.         return HC_CONTINUE
    6.    
    7.     // Set Knockback here, So if we blocked damage in TraceAttack event player won't get knockback (Fix For Madness)
    8.     if (g_bIsZombie[iVictim] && !g_bIsZombie[iAttacker])
    9.     {
    10.         // Remove Shock Pain
    11.         //set_member(iVictim, m_flVelocityModifier, 1.0)
    12.        
    13.         // Set Knockback
    14.         //static Float:flOrigin[3]
    15.         //get_entvar(iAttacker, var_origin, flOrigin)
    16.         //Set_Knockback(iVictim, flOrigin, get_pcvar_float(g_pCvarZombieKnockback), 2)
    17.     }
    18.    
    19.     return HC_CONTINUE
    20. }
Compile and try.
You don't know? Learn and you will know.

Rain1153
Senior Member
Senior Member
India
Posts: 277
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 18
Contact:

#10

Post by Rain1153 » 10 Months Ago

can we make it affect crocuhed zm too? but a little lessened!
LOL

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest