Deep thinker Posted October 13, 2016 Posted October 13, 2016 hello I need help with a simple script but it's kinda hard for me ,i want to create a col shape and disable warping in this area thank you,
quindo Posted October 14, 2016 Posted October 14, 2016 (edited) 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 October 14, 2016 by quindo Small fix
Deep thinker Posted October 15, 2016 Author Posted October 15, 2016 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 }
quindo Posted October 15, 2016 Posted October 15, 2016 I know it isn't working, it's just a template showing how the script may look like.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now