Death Posted July 16, 2015 Posted July 16, 2015 It is possible to use remote chatbox between 2 servers?
xXMADEXx Posted July 16, 2015 Posted July 16, 2015 Yes. You need to use the callRemote function. The wiki page for that function actually has a basic example that could possibly work.
Death Posted July 16, 2015 Author Posted July 16, 2015 not work! server 1 function outputChatBoxRemote ( playerName, message, type, serverport ) outputDebugString ( "[Freeroam]" .. playerName .. " " .. message ) end function playerChatCallback(erro,lol) outputDebugString ( "test "..erro.." "..lol ) end function playerChat ( message, type ) callRemote ( "127.0.0.1:22002", 'global_chat', "outputChatBoxRemote", playerChatCallback, getPlayerName(source), message, type, getServerPort() ) end addEventHandler ( "onPlayerChat", getRootElement(), playerChat ) server 2 function outputChatBoxRemote ( playerName, message, type, serverport ) outputDebugString ( "[Race]" .. playerName .. " " .. message ) end function playerChatCallback(erro,lol) outputDebugString ( "test "..erro.." "..lol ) end function playerChat ( message, type ) callRemote ( "127.0.0.1:22001", 'global_chat', "outputChatBoxRemote", playerChatCallback, getPlayerName(source), message, type, getServerPort() ) end addEventHandler ( "onPlayerChat", getRootElement(), playerChat )
GTX Posted July 17, 2015 Posted July 17, 2015 You must also configure your ACL, it's all written on wiki.
myonlake Posted July 17, 2015 Posted July 17, 2015 CURLE_COULDNT_CONNECT (7) Failed to connect() to host or proxy. It means you cannot connect to it for whatever reason. Make sure your internet connection is up, is not blocking ports and same for the other servers. Note, that you might have the incorrect port set to the URL field. You must pass in the server IP and the HTTP port, not the server port. HTTP port is by default 22005. You also have to make sure you have the internal HTTP server on in the mtaserver.conf file (always is, by default), it might get messy otherwise.
GTX Posted July 18, 2015 Posted July 18, 2015 Error 401: 401 Unauthorized Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource. See Basic access authentication and Digest access authentication. You must have done something wrong in ACL, double-check it. Tutorial written on wiki.
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