xXGhostXx Posted May 1, 2019 Share Posted May 1, 2019 Hi I want table for when player come to my positions show the chat box ! like this : tables { {x,y,z}, {x,y,z} } Link to comment
nxFairlywell Posted May 1, 2019 Share Posted May 1, 2019 local pos={ -- {x,y,z} {3.44,10.433,12.2}, {6.11,21.29,15.1}, }; for key, values in ipairs(pos) do outputChatBox("X: ("..values[1]..") Y: ("..values[2]..") Z: ("..values[3]..")"); end Link to comment
xXGhostXx Posted May 8, 2019 Author Share Posted May 8, 2019 On 01/05/2019 at 14:12, NX_CI said: local pos={ -- {x,y,z} {3.44,10.433,12.2}, {6.11,21.29,15.1}, }; for key, values in ipairs(pos) do outputChatBox("X: ("..values[1]..") Y: ("..values[2]..") Z: ("..values[3]..")"); end Expand Not work ! I want table for open the gui panel in my position ! Link to comment
nxFairlywell Posted May 8, 2019 Share Posted May 8, 2019 On 08/05/2019 at 19:41, xXGhostXx said: Not work ! I want table for open the gui panel in my position ! Expand Use the markers ! or Colshape Link to comment
LilDawage Posted May 9, 2019 Share Posted May 9, 2019 (edited) getDistanceBetweenPoints3D use this better and getElementPosition (your Pos ) and getElementPosition (player pos ) player pos >>> getElementByType(player) ds = getDistanceBetweenPoints3D if ds < 1 then outputChatBox(" ") Edited May 9, 2019 by LilDawage Link to comment
xXGhostXx Posted May 9, 2019 Author Share Posted May 9, 2019 On 08/05/2019 at 21:45, NX_CI said: Use the markers ! or Colshape Expand You can create for me with colshape ? On 09/05/2019 at 03:06, LilDawage said: getDistanceBetweenPoints3D use this better and getElementPosition (your Pos ) and getElementPosition (player pos ) player pos >>> getElementByType(player) ds = getDistanceBetweenPoints3D if ds < 1 then outputChatBox(" ") Expand I want table Link to comment
nxFairlywell Posted May 9, 2019 Share Posted May 9, 2019 local positions={ {fX,fY,fWidth,fHeight}, -- positions {fX,fY,fWidth,fHeight}, -- positions {fX,fY,fWidth,fHeight}, -- positions }; local colshape={}; for k, v in ipairs(positions) do local x,y,width,height=v[1],v[2],v[3],v[4] colshape[#colshape+1]=createColRectangle(x,y,width,height); -- colshape[key] = new col rectangle end addEventHandler("onClientColShapeHit",root, function(hitElement) if hitElement==localPlayer then for i=1,#colshape do -- loop for the colshapes table ( i = 1 to count of colshapes ) if colshape[i]==source then -- check the source colshape if it equals any colshape in the table of colshapes -- Your code end end end end ); 1 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