Raised This Month: $ Target: $400

Knife hit knockback

Post New Thread Reply   
Thread Tools Display Modes
Senior Member
Join Date: Jul 2023
Old 04-27-2024 , 08:55   Re: Knife hit knockback
Reply With Quote #21

Originally Posted by SaraAki View Post
Tote,now work only when attack enemy players,but also only when i kill player,killed player get knockbacked.Maybe problem is in velocity stock?
Ofcourse it's going to happen, thats what ur plugin function does. It's not even considered a "problem".
Tote is offline
Veteran Member
Join Date: Sep 2012
Old 05-01-2024 , 09:26   Re: Knife hit knockback
Reply With Quote #22

PHP Code:
stock create_velocity_vector(victimattackerFloat:velocity[3])
is_user_alive(victim) || !is_user_alive(attacker))

Float:vicorigin[3], Float:attorigin[3];

origin_diff[i] = vicorigin[i] - attorigin[i];

Float:fLen get_distance_f(vicoriginattorigin);

fLen <= 0.0) return 0;

origin_diff[i] /= fLen;

Float:knock_force get_pcvar_float(cvar_knock_force);
velocity[0] = (origin_diff[0] * knock_force );
velocity[1] = (origin_diff[1] * knock_force );
velocity[2] = (origin_diff[2] * knock_force) + random_float(200.0275.0);


Here you go this function should make more sense now, make sure to post in the proper section..
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Last edited by Natsheh; 05-01-2024 at 09:27.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh

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 14:43.

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