Jump to content

[HELP] Please


1LoL1

Recommended Posts

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

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

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

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