Try Posted July 7, 2011 Share Posted July 7, 2011 Heyo guysssssss!!! i have one code but i don't me get redirected i need other get redirected function joinserverHandlerFunction (playerSource, commandName, serverIP, serverPort, serverPassword) if serverIP and serverPort then --if IP and Port were specified if serverPassword then --if also a password was specified redirectPlayer (playerSource, serverIP, tonumber(serverPort), serverPassword) --redirect the player else -- else if no password was specified redirectPlayer (playerSource, serverIP, tonumber(serverPort)) --redirect the player without using the serverPassword parameter end else -- if no IP or Port have been specified outputChatBox ("Error! Correct Syntax: /joinserver IP Port [Password]", playerSource) --output an Error message to the chatbox end end addCommandHandler ("joinserver", joinserverHandlerFunction) Like i don't need put the ip i need put the people name and he get directed but with one ip Link to comment
Castillo Posted July 7, 2011 Share Posted July 7, 2011 You must add your resource to the admin group in acl.xml, redirectPlayer requires admin rights to work. Link to comment
Try Posted July 7, 2011 Author Share Posted July 7, 2011 u don't understant i need like this: function joinserverHandlerFunction (name, commandName, player) redirectPlayer (name, 194.187.214.31,22065) end addCommandHandler ("redirect", joinserverHandlerFunction) then i do /redirect and the people get redirected Link to comment
Castillo Posted July 7, 2011 Share Posted July 7, 2011 Oh, i'm sorry, I didn't read carefully . function joinserverHandlerFunction (client, commandName, player) local pl = getPlayerFromName(player) if pl then redirectPlayer (pl, "194.187.214.31","22065") end end addCommandHandler ("redirect", joinserverHandlerFunction) Try with that. Link to comment
JR10 Posted July 7, 2011 Share Posted July 7, 2011 And here is the one for your first code function joinserverHandlerFunction (playerSource, commandName, playerName, serverIP, serverPort, serverPassword) if serverIP and serverPort then --if IP and Port were specified if not getPlayerFromName(playerName) then return end if serverPassword then --if also a password was specified redirectPlayer (getPlayerFromName(playerName), serverIP, tonumber(serverPort), serverPassword) --redirect the player else -- else if no password was specified redirectPlayer (getPlayerFromName(playerName), serverIP, tonumber(serverPort)) --redirect the player without using the serverPassword parameter end else -- if no IP or Port have been specified outputChatBox ("Error! Correct Syntax: /joinserver IP Port [Password]", playerSource) --output an Error message to the chatbox end end addCommandHandler ("joinserver", joinserverHandlerFunction) use it like this: /joinserver Link to comment
Twisted Posted July 7, 2011 Share Posted July 7, 2011 aww bless you Try sorry i didnt help you with this Link to comment
Castillo Posted July 7, 2011 Share Posted July 7, 2011 Twisted, is ok, we're many here, we all help when we can . Link to comment
Try Posted July 7, 2011 Author Share Posted July 7, 2011 (edited) EDITEDDDD ______________ :@ sorry Edited July 7, 2011 by Guest Link to comment
Twisted Posted July 7, 2011 Share Posted July 7, 2011 AHH WHY TELL CASTILLO DAMN hes gunna be laughin Link to comment
Try Posted July 7, 2011 Author Share Posted July 7, 2011 WTFFFF i will edit who read read who don't read don't read Link to comment
Twisted Posted July 7, 2011 Share Posted July 7, 2011 WTFFFF i will edit who read read who don't read don't read ok no neeed to edit baby but aww well <3 lets keep this on the scripting side and talk about anything else in the server <3 Link to comment
Try Posted July 7, 2011 Author Share Posted July 7, 2011 yeah thats not goooood to talk here here is script area Link to comment
Twisted Posted July 7, 2011 Share Posted July 7, 2011 sorry sir got abit bored at the time, i will help my girlfriend if she needs help she can post here Link to comment
Jaysds1 Posted July 8, 2011 Share Posted July 8, 2011 sorry sir got abit bored at the time, i will help my girlfriend if she needs help she can post here lol, she's runin a server too? And try, when showing Lua codes use , the lua code goes in between them. Link to comment
Twisted Posted July 8, 2011 Share Posted July 8, 2011 No jaysds shes learning to script for a server im currently working on Link to comment
qaisjp Posted July 9, 2011 Share Posted July 9, 2011 Someone lock this please, this sounds like it is going way offtopic and it looks like the problemo is resolved-o. Link to comment
Try Posted July 10, 2011 Author Share Posted July 10, 2011 Its not for lock, i tried the code and look what show at debugscript: Access Denied redirectplayer Link to comment
Castillo Posted July 10, 2011 Share Posted July 10, 2011 As I said in my first post (if I remember well), you must add the resource to the admin group in acl.xml. Link to comment
Try Posted July 10, 2011 Author Share Posted July 10, 2011 but Castillo have how to don't add and work? Link to comment
Castillo Posted July 10, 2011 Share Posted July 10, 2011 What? it should work if the admin group has the right to use that function o_O. Link to comment
Try Posted July 10, 2011 Author Share Posted July 10, 2011 nooooo i think have some code for don't need add at acl? Link to comment
ChaseOquinn Posted July 10, 2011 Share Posted July 10, 2011 Like Solidsnake said you must add the resource to the admin group in your acl. Add this line: Link to comment
Try Posted July 10, 2011 Author Share Posted July 10, 2011 Omg This i understant chaseeeeeeeee But don't have a code for don't need put this at acl like a code for add at the script 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