Jump to content

Redirect


Try

Recommended Posts

Posted

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

;)
Posted

You must add your resource to the admin group in acl.xml, redirectPlayer requires admin rights to work.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

;)
Posted

Oh, i'm sorry, I didn't read carefully :oops: .

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Posted

Twisted, is ok, we're many here, we all help when we can :D.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
WTFFFF i will edit who read read who don't read don't read xD

ok no neeed to edit baby but aww well :P <3 lets keep this on the scripting side and talk about anything else in the server <3 :P

Posted

Ok, stop off-topic.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • MTA Team
Posted

Someone lock this please, this sounds like it is going way offtopic and it looks like the problemo is resolved-o.

Posted

Its not for lock,

i tried the code and look what show at debugscript:

Access Denied redirectplayer

;)
Posted

As I said in my first post (if I remember well), you must add the resource to the admin group in acl.xml.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

What? it should work if the admin group has the right to use that function o_O.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

;)

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...