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