How to push player?
How to push player?
|
Re: How to push player?
PHP Code:
|
Re: How to push player?
Would that not just teleport them to the new location, or does it actually move them there at an adjustable rate?
I always just used SetEntDataVector( client, m_vecBaseVelocity, velocity, true ); |
Re: How to push player?
Samantha, I'm using it... i want to create knockback on event hurt. but it freeze player in sky when he jump or he fall from sky.
|
Re: How to push player?
You would have to calculate the forces you wanna act on the client, X Y Z. What did u put in the push vectors?
zeroibis, that does work and it wouldn't teleport the client anywhere since we are passing NULL for vectors. |
Re: How to push player?
It goes
TeleportEntity(entity, positionvector, anglevector, velocityvector) So passing null for the first two doesn't change client position, nor angle, just velocity. Just a clarification for anybody that didn't understand. |
Re: How to push player?
Quote:
|
Re: How to push player?
If you want to get a "realistic" feeling push like the explosions in the game give, you should get the client's current velocity, then add the "push" velocity vector to it, and teleport him there. With the way that is suggested, it will feel more like being airblasted or hit with the fan, which basically stops all your momentum and just pushes you at the same speed regardless of what you're doing.
This should go in OnPluginStart() with playerVelOffset as a global variable. PHP Code:
PHP Code:
|
All times are GMT -4. The time now is 20:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.