Jump to content

Random teleport in interior with command


Notorious^

Recommended Posts

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
  • Discord Moderators
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...