block player touch (distance)
is there anyway to block team players touching, like a shield or aura beetwen them?
i already used knockback function (pev(ptd, pev_origin etc...set_pev(ptd, pev_velocity.....) but that's not it, they can touch, but after touch one of them is knocked back... |
Re: block player touch (distance)
can you post the .sma code? maybe i can help :)
|
Re: block player touch (distance)
Check distance between players in PreThink, and then if players are too close then you can stop both players from moving.
|
Re: block player touch (distance)
i used something like this
PHP Code:
but still i need to allow enemy player walk thru that entity? |
Re: block player touch (distance)
So you want to limit players from getting close to eachother ?
If you like it to be more awesome and feel like something that magnetically/magiacally rejects you, you should set velocity on the player, in the opposite direction. You'll need to get direction from player to protected player (NOT player's moving direction), and multiply it by the negative direction, clamp it so it doesn't shoot players like bullets nor be too weak. |
Re: block player touch (distance)
Quote:
can you give me some example? |
Re: block player touch (distance)
Try something like this:
Code:
|
Re: block player touch (distance)
Code:
#include <amxmodx> |
Re: block player touch (distance)
thank you both for helping, i'll test both plugin :)
|
Re: block player touch (distance)
sorry for double, exolent your plugin spawns player somewhere out of map
i guess that distance is too big, maybe it will work after changing MINIMUM_DISTANCE Hunter-Digital i didn't have free time to change and try your method, but i will. |
| All times are GMT -4. The time now is 23:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.