1LoL1 Posted October 19, 2015 Share Posted October 19, 2015 Hello, why in this my code doesn't work callRemote? function n () local server = "LOL" callRemote ( "ip", getResourceName(getThisResource()), "outputChatBoxRemote", server.." is good server "..getPlayerCount().."", type, server ) end addCommandHandler("n", n) WARNING: Bad argument @ "callRemote" [Expected function at artument 4, got string, LOL is good server 1"] Link to comment
ozulus Posted October 19, 2015 Share Posted October 19, 2015 You forgot to add callback function. function callBack() end function n () local server = "LOL" callRemote ( "ip", getResourceName(getThisResource()), "outputChatBoxRemote", callBack, server.." is good server "..getPlayerCount().."", type, server ) end addCommandHandler("n", n) Link to comment
1LoL1 Posted October 19, 2015 Author Share Posted October 19, 2015 Doesn't work. when i use /n nothing. Link to comment
ozulus Posted October 19, 2015 Share Posted October 19, 2015 I guess you didn't modify the ACL. https://wiki.multitheftauto.com/wiki/CallRemote ACL: Then, modify the ACL on each sending server to allow access to callRemote: "OutRPCGroup"> "OutRPC" /> "resource.examplechat" /> "OutRPC"> "function.callRemote" access="true" /> ACL #2: Finally, modify the ACL on each receiving server to allow guest http communication with your resource: "InRPCGroup"> "InRPC" /> "user.http_guest" /> "InRPC"> "resource.examplechat.http" access="true" /> 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