VanDal Posted January 30, 2015 Share Posted January 30, 2015 guys can you help me in this i want to add interior to this pos : local prisonCells = { {1572.83984375, -1637.4758300781, -83.001655578613}, and the jail map in interior "6" i need to add the interior because the cop when he arrest the crim and get him to jail the player find himself flying. srry for the bad english. Link to comment
SkatCh Posted January 30, 2015 Share Posted January 30, 2015 Just add 6 inside the table: like this local prisonCells = { {1572.83984375, -1637.4758300781, -83.001655578613 , 6}, -- then use this for i , v in ipairs (prisonCells) do -- You code here end or you can use setElementInterior Link to comment
VanDal Posted January 30, 2015 Author Share Posted January 30, 2015 Just add 6 inside the table:like this local prisonCells = { {1572.83984375, -1637.4758300781, -83.001655578613 , 6}, -- then use this for i , v in ipairs (prisonCells) do -- You code here end or you can use setElementInterior ok thank you dude. Link to comment
VanDal Posted January 30, 2015 Author Share Posted January 30, 2015 sorry my friend but can you help me more i make itl ike this : {1572.83984375, -1637.4758300781, -83.001655578613 , 6} , setElementInterior(player, 6) } and its give me this error : jail_server.lua:21: '}' expected (to close '{' at line 18) near 'setElementInterior' Link to comment
Moderators DNL291 Posted January 30, 2015 Moderators Share Posted January 30, 2015 It's missing: "}" local prisonCells = { {1572.83984375, -1637.4758300781, -83.001655578613 , 6}, } Link to comment
VanDal Posted January 31, 2015 Author Share Posted January 31, 2015 It's missing: "}" local prisonCells = { {1572.83984375, -1637.4758300781, -83.001655578613 , 6}, } I already make it "}" but nothing. but its ok i will make onther jail without interior Link to comment
Dealman Posted January 31, 2015 Share Posted January 31, 2015 You can do it like this; local prisonCells = { {1572.83984375, -1637.4758300781, -83.001655578613, 6} } for i, v in ipairs(prisonCells) do local posX, posY, posZ, theInterior = unpack(v) setElementPosition(playerElement, posX, posY, posZ+1) -- Add 1 or 2 to Z Axis so the objects can load. setElementInterior(playerElement, theInterior) end Link to comment
VanDal Posted January 31, 2015 Author Share Posted January 31, 2015 You can do it like this; local prisonCells = { {1572.83984375, -1637.4758300781, -83.001655578613, 6} } for i, v in ipairs(prisonCells) do local posX, posY, posZ, theInterior = unpack(v) setElementPosition(playerElement, posX, posY, posZ+1) -- Add 1 or 2 to Z Axis so the objects can load. setElementInterior(playerElement, theInterior) end oh thank you realy helpful its work thnx again 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