kevincouto6 Posted December 29, 2017 Share Posted December 29, 2017 I wanted to do a teleport with the / pvp command, with several spawn points, but I can not. function tele (thePlayer) local spawns = { } spawns1 ( thePlayer, 2181,-2495, 14 ) spawns2 ( thePlayer, 2181,-2495, 14 ) spawns3 ( thePlayer, 2181,-2495, 14 ) spawns4 ( thePlayer, 2181,-2495, 14 ) spawns5 ( thePlayer, 2181,-2495, 14 ) end addCommandHandler ( "pvp", tele ) Link to comment
KaMi Posted December 29, 2017 Share Posted December 29, 2017 local spawns = { { 2181,-2495, 14 }, { 2181,-2495, 14 }, { 2181,-2495, 14 }, { 2181,-2495, 14 }, { 2181,-2495, 14 } } function tele(player) local teles = math.random ( #spawns ) if ( teles ) then setElementPosition(player, unpack ( spawns [ teles ] )) spawnPlayer (thePlayer, unpack ( post [ alazar ] )) end end addCommandHandler ( "pvp", tele ) Link to comment
kevincouto6 Posted December 29, 2017 Author Share Posted December 29, 2017 15 minutes ago, <~KaMiKaZe~> said: local spawns = { { 2181,-2495, 14 }, { 2181,-2495, 14 }, { 2181,-2495, 14 }, { 2181,-2495, 14 }, { 2181,-2495, 14 } } function tele(player) local teles = math.random ( #spawns ) if ( teles ) then setElementPosition(player, unpack ( spawns [ teles ] )) spawnPlayer (thePlayer, unpack ( post [ alazar ] )) end end addCommandHandler ( "pvp", tele ) thx bro 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