Lorder Posted October 15, 2017 Posted October 15, 2017 addCommandHandler ( "go", function ( player ) setTimer ( function ( ) for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do redirectPlayer ( thePlayer, "91.121.70.169", 22017 ) end end ,5000, 1 ) outputChatBox ( "You Will be Moved to the Server in 5 sec ...", player ) outputChatBox ( "Player ".. getPlayerName ( player ) .." Has Moved to the Server !", getRootElement(), 250, 255, 0 ) end ) I want to direct the tournament to the server everywhere
GodOfPenguins Posted October 15, 2017 Posted October 15, 2017 (edited) Change "player" in argument to "thePlayer" from redirectPlayer function Edited October 15, 2017 by Taka
Lorder Posted October 15, 2017 Author Posted October 15, 2017 1 hour ago, koragg said: What's the error in /debugscript 3 ?
W4LK1NG Posted October 15, 2017 Posted October 15, 2017 1 hour ago, Taka said: Change "player" in argument to "thePlayer" from redirectPlayer function Dude, I don't think this has anything to do with it, I can put potato over there that the resource will read as if it were thePlayer 10 minutes ago, Lorder said: Does the following, places the resource name with administrator rights, goes in the ACL list in the Administration group and add resource."ResourceName" 1 1
koragg Posted October 15, 2017 Posted October 15, 2017 (edited) @Lorder try this: function redirect(player) setTimer(function(target) redirectPlayer(target, "91.121.70.169", 22017) end ,5000, 1, player) outputChatBox("You will be moved to the other server in 5 seconds...", player) outputChatBox("Player "..getPlayerName(player).." has moved to the other server!", root, 250, 255, 0, true) end addCommandHandler("go", redirect) Edited October 15, 2017 by koragg
W4LK1NG Posted October 16, 2017 Posted October 16, 2017 I think he wants to move all players from one server to another, so he used the for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do His problem is that the resource is not allowed to do such a thing.
MaurO^ Posted October 16, 2017 Posted October 16, 2017 in acl admin group add this: <object name="resource.yourResourceName"></object>
koragg Posted October 16, 2017 Posted October 16, 2017 4 hours ago, W4LK1NG said: I think he wants to move all players from one server to another, so he used the for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do His problem is that the resource is not allowed to do such a thing. I got confused a bit He's mixed up redirecting all players and redirecting one player in the code. If everyone will be redirected why is the last outputChatBox needed? And yeah do as the guy above me said @Lorder.
^iiEcoo'x_) Posted October 16, 2017 Posted October 16, 2017 addCommandHandler ( 'go' , function ( Player ) outputChatBox ( 'Redirect 5 s. !' , Player ) setTimer ( function ( ) redirectPlayer ( Player , '91.121.70.169', 22017 ) end , 5000 , 1 ) end ) add to admin .
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