[HELP] Detect Walls In A Radius
Okay, this is something I've been trying to do for a long time and still don't even know where to begin. I've been trying to fix Arkshine's Prone Position plugin, where the player's vision can go outside the walls if you crawl up to one and potentially do wallhacks. I think it has something to do with using "usehull" though I'm not sure.
The idea I have is simple: While on prone, the plugin will detect if any walls are nearby within a radius, record which direction the wall/s are from and push the player back away from it. Right, I don't know where to even begin. I was studying TraceHull but it doesn't seem to have a radius that you could set. The prone plugin seems to make player clipping much smaller so it has to detect the wall a bit of distance away from the player. Another idea I had is to just detect if the player was outside the map and would just fade his screen black until said player comes back inside, as posted here (https://forums.alliedmods.net/showthread.php?t=185682). But again, it doesn't work. Probably because burying your head in walls while in prone doesn't count as being outside since the clipping becomes small... |
Re: [HELP] Detect Walls In A Radius
What you said works both when crouching and standing and if I'm not mistaking only on oblique walls.
A sideways TraceLine should do the trick. Anyway, I would recommend using WhBlocker instead. |
Re: [HELP] Detect Walls In A Radius
My advice is don't use bad maps.
Or you can use wall guard plugin to block players from getting there. |
Re: [HELP] Detect Walls In A Radius
Hi guys. Sorry but both didn't work. I've installed WhBlocker properly. I know that for a fact since producing error-free logs. And I've tried some anti-wallhack plugins that I could find. The problem I think is the prone_position plugin makes your hull very small and as long as that part doesn't go thru the wall it doesn't count as a wallhack.
I tried studying TraceLine and came up with a test plugin. It works but I think it could be a lot better. So just a refresher, I'm trying to make the player keep a certain distance (50 units) away from walls. In the test plugin I fire a TraceLine that's 50 units long towards the direction they're going and when the line gets a hit any movement towards that object is halted. This is what I got: PHP Code:
1. The trace is not directly towards where the player is moving. 2. My method of blocking movement is kinda cheap. Also counter-intuitive since you have to re-press the movement keys to get them to work again. The other two I tried (teleporting and setting player speed) doesn't block movement completely. The player can still slowly get near the wall... |
| All times are GMT -4. The time now is 02:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.