5150 Posted November 30, 2015 Share Posted November 30, 2015 is there any way to make a colshape that, when u enter it, will prevent people from warping to you? not the securezone mod, i mean it literally says "you cant warp to this person right now" or (something like that) when the other player is in that colshape Link to comment
DRW Posted November 30, 2015 Share Posted November 30, 2015 is there any way to make a colshape that, when u enter it, will prevent people from warping to you? not the securezone mod, i mean it literally says "you cant warp to this person right now" or (something like that) when the other player is in that colshape Yes, here's an example. local colShape = createColSphere (0,0,0,50) setElementData (colShape,"warpproof",true) addCommandHandler ("warp",function(executer) for i,colshapes in ipairs (getElementsByType("colshape")) do if getElementData (colshapes,"warpproof") then if isElementWithinColShape (executer,colshapes) then outputChatBox ("You can't warp from here!",executer) return end end end end) Link to comment
5150 Posted December 1, 2015 Author Share Posted December 1, 2015 wait so the command does what? Link to comment
5150 Posted December 1, 2015 Author Share Posted December 1, 2015 i think were on different pages lol.... i mean: i have a secret zone in my server. no one can get to it EXCEPT if they warp to me while im in it i dont want them to be able to warp to me, but ONLY when im inside the area the securezone mod does this but with a delay.. Link to comment
myonlake Posted December 1, 2015 Share Posted December 1, 2015 Depends what you mean by warping. Are you using the freeroam resource, or..? If so, then you need to implement your own way to fix it so that you can't warp while x things are enabled. If you're using something else to warp, then we'd need to see the code to help you. To answer your initial question: yes, it is possible, even if you're using the freeroam resource. Link to comment
5150 Posted December 1, 2015 Author Share Posted December 1, 2015 im using freeroam yes. and let me try to explain it better.... i mean, i want an area that only the admin ACL has access to. meaning, no matter what a normal player does, they cannot get inside that area i have a current resource called securezone, that will warp you out on a timer the problem with that is people can see whats inside in that 1 second before they are warped out i hope that helps Link to comment
myonlake Posted December 1, 2015 Share Posted December 1, 2015 im using freeroam yes. and let me try to explain it better....i mean, i want an area that only the admin ACL has access to. meaning, no matter what a normal player does, they cannot get inside that area i have a current resource called securezone, that will warp you out on a timer the problem with that is people can see whats inside in that 1 second before they are warped out i hope that helps Well. You could map collisions around the base, or implement a smart collision object which rotates around the colshape correspondingly to the position of the player, so you only need one element for that. It's not going to be easy, so you want to think first. Use securezone and make the timer faster, or then don't use securezone and spend a few days figuring out how to make the difficult code. Link to comment
5150 Posted December 3, 2015 Author Share Posted December 3, 2015 i put Szone down to 1 second but its as low as i can get without it bugging Link to comment
Dealman Posted December 3, 2015 Share Posted December 3, 2015 So if the script actually do work, but it doesn't warp them fast enough - why not make the shape a little bigger? Are you using timers or the colshape events? Link to comment
5150 Posted December 3, 2015 Author Share Posted December 3, 2015 its not a fact of them walking into the colshape guys.... the secret area is inside mount chiliad (under the map), so the colshape is around most of the mountain. people cannot walk into the secret area inside the mountain, because duh its INSIDE the mountain. the only way to get in currently is to warp to me after im already in it. so it wouldnt matter if i made the colshape bigger, because they would still just warp to where i do not want them. here is the client script for my securefortress mod. (its securezone but for the mountain) --COPY AND PASTE THIS, CHANGE WARP1 AND DISPLAYTIMER-- addEvent("displayTimer1", true) addEventHandler("displayTimer1", root, function() addEventHandler("onClientRender", root, draw) if isTimer(timer) then killTimer(timer) end timer = setTimer(function() removeEventHandler("onClientRender", root, draw) triggerServerEvent("warp1", localPlayer) end,250,1) end) ------------------------------------------------------- --LEAVE THIS ALONE-- function draw() if isTimer(timer) then local timeLeft = math.ceil(getTimerDetails(timer) / 250) dxDrawText("To leave the area!",557.0,318.0,872.0,368.0,tocolor(255,0,0,255),2.0,"default","left","top",false,false,false) dxDrawText(tostring(timeLeft),630.0,277.0,690.0,324.0,tocolor(255,0,0,255),3.0,"default","left","top",false,false,false) dxDrawText("You have: ",546.0,224.0,725.0,271.0,tocolor(255,0,0,255),4.0,"default","left","top",false,false,false) end end the 250 is the miliseconds. thats the lowest i could get it Link to comment
Addlibs Posted December 3, 2015 Share Posted December 3, 2015 You will need to modify the freeroam resource, adding preliminary checks to warp function, such as whether the destination coordinates are within a certain 3D/2D distance range from your centre of the base. Link to comment
5150 Posted December 4, 2015 Author Share Posted December 4, 2015 that sounds hella complicated lol.... ill just see if i can find another mod to work with securezone Link to comment
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