Death Posted July 16, 2015 Share Posted July 16, 2015 It is possible to use remote chatbox between 2 servers? Link to comment
xXMADEXx Posted July 16, 2015 Share 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. Link to comment
Death Posted July 16, 2015 Author Share 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 ) Link to comment
GTX Posted July 17, 2015 Share Posted July 17, 2015 You must also configure your ACL, it's all written on wiki. Link to comment
Death Posted July 17, 2015 Author Share Posted July 17, 2015 I configured however does not work Link to comment
xXMADEXx Posted July 17, 2015 Share Posted July 17, 2015 What does debugscript say? (/debugscript 3) Link to comment
Death Posted July 17, 2015 Author Share Posted July 17, 2015 return mycallback is test ERROR 7 Link to comment
myonlake Posted July 17, 2015 Share 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. Link to comment
Death Posted July 17, 2015 Author Share Posted July 17, 2015 not work error 401 help me Link to comment
GTX Posted July 18, 2015 Share 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. 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