Jump to content

[HELP]I need to make anti-warp area


Deep thinker

Recommended Posts

canwarp = 1
colshapes = {
  colshape1,
  colshape2,
  ...
  }

function warp(thePlayer, ...)
  for i,colshape in ipairs(colshapes) do
    check = isElementWithinColShape(thePlayer, colshape)
    if check then
      canwarp = 0
      break
     end
  end
  if canwarp == 1 then
    warpwarpwarpwarpfunction...
  else
    outputChatBox("can't warp here")
 end
 canwarp = 1
end
  

Maybe something like that would work?

Edited by quindo
Small fix
Link to comment
On ١٤‏/١٠‏/٢٠١٦ at 9:07 AM, quindo said:

canwarp = 1colshapes = {  colshape1,  colshape2,  ...  }function warp(thePlayer, ...)  for i,colshape in ipairs(colshapes) do    check = isElementWithinColShape(thePlayer, colshape)    if check then
      canwarp = 0
      break
     end
  end
  if canwarp == 1 then
    warpwarpwarpwarpfunction...
  else
    outputChatBox("can't warp here")
 end
 canwarp = 1
end
  

Maybe something like that would work?

this isn't working Also i want a table would like this 

local antiwarping = {
    {x = 200, y = 200, z = 20, width = 100, depth = 100, height = 15}, -- antiwarp
}

 


 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...