Notorious^ Posted March 25, 2018 Share Posted March 25, 2018 local spawns = { { 5, 1270.63086, -795.69354, 1084.17188 }, { 5, 1272.81873, -808.30115, 1084.00781 }, { 5, 1234.19507, -807.81671, 1084.00781 }, { 5, 1245.26343, -778.87067, 1084.00781 } } function spawn( player ) local rnd = math.random( 1, #spawns ) setElementInterior( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] ) end addCommandHandler("duel",spawn) ı want make random teleport to in madd dogg's house for duel but what is my wrong ? its not work .. can you help me ? i Link to comment
Storm-Hanma Posted March 26, 2018 Share Posted March 26, 2018 Run debugscript and check for errors ,see in console for errors make sure it saved on server.lua it works only on server side ,make sure you added interior id also with xyz positions Link to comment
LLCoolJ Posted March 26, 2018 Share Posted March 26, 2018 setElementInterior( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3],spawns[rnd][4] ) Link to comment
Discord Moderators Pirulax Posted March 28, 2018 Discord Moderators Share Posted March 28, 2018 local spawns = { { 5, 1270.63086, -795.69354, 1084.17188 }, { 5, 1272.81873, -808.30115, 1084.00781 }, { 5, 1234.19507, -807.81671, 1084.00781 }, { 5, 1245.26343, -778.87067, 1084.00781 } } function spawn( player ) local rnd = math.random( 1, #spawns ) setElementInterior( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] ) end addCommandHandler("duel", spawn, false, false)--> Add false to the end, so it doesnt matter how you type the command in. 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