Jump to content

Some questions


Recommended Posts

Posted

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 :D

Posted

What errors are you getting on the script?

If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE

SCOTLAND, my hometown, and the Home of GTA!

Posted

Added the resource to acl.xml?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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?

Posted

You are using the IPs from the example, "play.mtabeta.com:33004", change that and the other to your server IP/port.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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