Disallowed movement
#4
Just throwing an example out there, I even had trouble with this at one point:

-- Lets define a box around 0, 70, 0 thats about 3 cubes big, just for this example.

-- Construct a box using opposite points defined as a min and max Vector3d
local VIPBox = cBoundingBox(Vector3d(-3, 67, -3), Vector3d(3, 73, 3))

-- Lets use the OnPlayerMoving hook to check if they are attempting to enter
function OnPlayerMoving(Player, OldPos, NewPos)
    -- Check if the position that will jump to next is inside the box
    if VIPBox:IsInside(NewPos) then
        -- Tell the server that this plugin has handled the player\'s movement and do not let the server advance the player
        return true
    end
end
Reply
Thanks given by:


Messages In This Thread
Disallowed movement - by Bobstergaming - 11-07-2015, 09:16 PM
RE: Disallowed movement - by NiLSPACE - 11-07-2015, 09:54 PM
RE: Disallowed movement - by xoft - 11-09-2015, 08:32 AM
RE: Disallowed movement - by Bobstergaming - 11-12-2015, 06:05 AM
RE: Disallowed movement - by DiamondToaster - 11-10-2015, 06:34 AM
RE: Disallowed movement - by Bobstergaming - 11-12-2015, 06:41 AM
RE: Disallowed movement - by NiLSPACE - 11-12-2015, 07:54 AM
RE: Disallowed movement - by Bobstergaming - 11-14-2015, 01:25 AM
RE: Disallowed movement - by DiamondToaster - 11-14-2015, 09:20 AM
RE: Disallowed movement - by NiLSPACE - 11-14-2015, 01:28 AM
RE: Disallowed movement - by Seadragon91 - 11-14-2015, 04:19 PM
RE: Disallowed movement - by Bobstergaming - 11-15-2015, 07:03 PM
RE: Disallowed movement - by NiLSPACE - 11-15-2015, 07:21 PM
RE: Disallowed movement - by xoft - 11-18-2015, 04:28 AM
RE: Disallowed movement - by Bobstergaming - 11-18-2015, 06:48 AM
RE: Disallowed movement - by xoft - 11-18-2015, 06:40 PM
RE: Disallowed movement - by NiLSPACE - 11-18-2015, 08:41 PM
RE: Disallowed movement - by xoft - 11-18-2015, 09:55 PM



Users browsing this thread: 1 Guest(s)