[STOCK] isEntityInsideFakeZone
Sometimes ( at least in my codes ) I needed to know if an entity is inside a fake zone within a specific function, instead of hooking the moment of entering. So here you go:
Code:
stock bool:isEntityInsideFakeZone(entity, Float:xOriginWall, Float:xOriginParallelWall, Float:yOriginWall2, Float:yOriginParallelWall2, Float:zOriginCeiling, Float:zOriginFloor) @Float:xOriginWall = The x origin of a wall. @Float:xOriginParallelWall = The x origin of a wall parallel to the first wall. @Float:yOriginWall2 = The y origin of the other wall. @Float:yOriginParallelWall = The y origin of the wall paralel to the other wall. @Float:zOriginCeiling = The z origin of the ceiling. @Float:zOriginFloor = The z origin of the floor. @Note: All four walls and two ceilings should create a cube that is the zone. @Note: When using the origins of the first and parallel to first wall, ensure that their Y origin is almost equal or you'll make the cube really problematic. |
Re: [STOCK] isEntityInsideFakeZone
This might also be helpful if anyone needs it: https://forums.alliedmods.net/showthread.php?p=2030793
|
Re: [STOCK] isEntityInsideFakeZone
Quote:
|
Re: [STOCK] isEntityInsideFakeZone
The stock I linked checks all axes
|
All times are GMT -4. The time now is 19:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.