Weapon Knockback
#1

Example, I've shot player1 using a shotgun, I would like to have a knockback added when I do.

I've read this:

Код:
Consider player1 and player2. 
player1 - On ground
player2 - In vehicle to ram player1

First check if the player1 is having a M4/Deagle when he fire s(OnPlayerKeyStateChange?), and then GetPlayerCameraFrontVector and GetPlayerCameraPos to get the player1's aim position.

Check if the aim position is matching with the GetPlayerPos of the player2 who is trying to ram the player1. If it matches, SetPlayerPos of the player2 some distance back.
I just don't get it without to see an example, that would help a lot I'll surely appreciate it. Anyways, thanks.
Reply
#2

You only need one callback: OnPlayerWeaponShot

And then check where the bullet went, if the target is hit get his position, and subtract like 1/2 from his Y position. (maybe less... maybe X.. just try)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)