|
Is there any way to detect IP addresses in-game? Like a player's IP adress |
|
|
|
How? I'm making this GUI where it shows a player the Server Port and their IP address. I have the Port thign down, I just need to know how I can find the player's IP adress. |
|
|
Don't tell him, Network Client!! |
|
|
So, you do it like you would with the Port?
Like:
game.NetworkServer.IPAddress
or something like that? |
|
|
fuzzyhedJoin Date: 2008-09-17 Post Count: 1204 |
I think getting the children of networkServer.. |
|
|
Yes, but it doesn't say anything on HOW to get the Ip address. Can someone just tell me. Is it something like: game.NetworkServer.IPAddress? |
|
|
@fuzzy
So you mean like:
game.NetworkServer[game.NetworkServer:GetChildren()].IPAddress? |
|
|
Each child of Network server is some class, named after an IP address of one of the players, if you can match up the timing of when an IP was added to network server, and when a player was added to players, you can infer which IP belongs to which player. Hope this helps :3 |
|
|
It kinda helps. But not really. |
|
|
Let me see if i can find an old IP ban script of mine, though I never got the player to IP conversion right :P it will work properly when 1 person joins, but I've never tried it with multiple people joining at once :O |
|
|
Well. I just need a line of it for my GUI. |
|
|
_G.Names = {}
_G.IPs = {}
function newIP(new)
local ip = new.Name
ipfix = ip:find(":")
ip = ip:sub(1,ipfix-1)
local name = ""
local nameFired = false
function newName(new)
if nameFired == false then
nameFired = true
name = new.Name
end
end
game.Players.ChildAdded:connect(newName)
repeat wait(.1) until name ~= nil
print(name,ip)
Names[name]=ip
if IPs[ip] == nil then
IPs[ip]={}
IPs[ip].Time = 0
end
IPs[ip][#IPs[ip]+1] = name
end
game.NetworkServer.ChildAdded:connect(newIP)
(i join game)
print(Names["DidYouSeeThatDog"])
>255.255.255.255
Or something like that :3
Maybe this will help :3 ? |
|
|
I'm thinking that it may be this:
game.NetworkServer[script.Parent.Parent.Parent.Parent.Parent.Name].IP |
|
MrNicNacJoin Date: 2008-08-29 Post Count: 28554 |
Game.NetworkServer.ChildAdded:connect(
function( instanceIP )
Game.Players.PlayerAdded:connect(
function( instancePlayer )
print(instancePlayer, " IP : ", instanceIP)
end
)
end
) |
|
|
Yeah, that'll work better for OP's needs :p
though you might wanna ad this to get rid of the ":53640" on the end
fix = instanceIP:find(":")
instanceIP = instanceIP:sub(1,fix-1) |
|
|
@MrNicNac
Thanks. I'll test yours right now. |
|
|
Game.NetworkServer.ChildAdded:connect(
function( instanceIP )
Game.Players.PlayerAdded:connect(
function( instancePlayer )
print(instancePlayer, " IP : ", instanceIP)
fix = instanceIP:find(":")
instanceIP = instanceIP:sub(1,fix-1)
end
)
end
)
Now, I just need it work for my Gui |
|
|
|
IP Address = Stalkers.
I would believe this script could get you in trouble. |
|
|
Dsepic, stop over reacting.
Your IP address is PLASTERED all over the internet, any time you do anything, your IP is saved. Its not a hidden feature of roblox so its not really a problem (besides disclosing the approx area of where a user lives, if we could look it up in scripts of course). Though ATM, my IP aprears to be from germany, but I'm in america :D
tl;dr, read it, then lrn2internet |
|
|
I still believe IP Address tracking is for companies to know, not teenagers. |
|
|
Dude, stop over reacting, its no big deal.
If you're afraid of other poeple knowing your IP, you should stick a magnet inside your computer right now. |
|
|