lolcatsareawesome Posted July 10, 2013 Posted July 10, 2013 Hi everyone, I've some questions and I hope you have the answer. The first one is, how I can get the server IP where the script is executed? I search for a function talking about that but I can't find it. Why it doesn't exist? Second question is about an script i've seen on the wiki and I would love to use it's that: function outputChatBoxRemote ( playerName, message, type, serverport ) if serverport ~= getServerPort() then outputChatBox ( "From " .. playerName .. " on " .. serverport .. ": " .. message ) end end function playerChatCallback() end function playerChat ( message, type ) callRemote ( "play.mtabeta.com:33004", getResourceName(getThisResource()), "outputChatBoxRemote", playerChatCallback, getPlayerName(source), message, type, getServerPort() ) callRemote ( "play.mtabeta.com:33005", getResourceName(getThisResource()), "outputChatBoxRemote", playerChatCallback, getPlayerName(source), message, type, getServerPort() ) callRemote ( "play.mtabeta.com:33006", getResourceName(getThisResource()), "outputChatBoxRemote", playerChatCallback, getPlayerName(source), message, type, getServerPort() ) end addEventHandler ( "onPlayerChat", getRootElement(), playerChat ) Link: https://wiki.multitheftauto.com/wiki/CallRemote I've read the instructions but this still not working. Last question, with the script below. It only works with servers who have the same IP with differents ports? I hope you can help me guys
lolcatsareawesome Posted July 10, 2013 Author Posted July 10, 2013 What errors are you getting on the script? There don't have any errors on the debug. The message isn't send to the second server. I don't know if this script is now obsolete.
lolcatsareawesome Posted July 10, 2013 Author Posted July 10, 2013 Added the resource to acl.xml? Well, of course i've added the resource to the ACL but in the Admin group. They say to create an group for that resource, I think it's useless cuz the Admin group got all rights. <group name="OutRPCGroup"> <acl name="OutRPC" /> <object name="resource.examplechat" /> </group> <acl name="OutRPC"> <right name="function.callRemote" access="true" /> </acl> <group name="InRPCGroup"> <acl name="InRPC" /> <object name="user.http_guest" /> </group> <acl name="InRPC"> <right name="resource.examplechat.http" access="true" /> </acl> The script still not working. And about the 2 other questions?
Castillo Posted July 10, 2013 Posted July 10, 2013 You are using the IPs from the example, "play.mtabeta.com:33004", change that and the other to your server IP/port.
lolcatsareawesome Posted July 10, 2013 Author Posted July 10, 2013 You are using the IPs from the example, "play.mtabeta.com:33004", change that and the other to your server IP/port. Of course I change... But still not working
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