generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Getting player IP

Previous Thread :: Next Thread 
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
11 Jan 2012 08:34 PM
How do I obtain a player's IP address? I know it's possible:

http://www.roblox.com/Demo-place?id=54794441
Report Abuse
Kingkong8000 is not online. Kingkong8000
Joined: 23 Jul 2011
Total Posts: 204
11 Jan 2012 08:39 PM
i thought roblox said they fix'd it so you can't
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
11 Jan 2012 08:39 PM
Go to the place in the link I posted.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
11 Jan 2012 08:45 PM
just did a quick search and came up with a not tooo old thread

bannedIps = { }
game.NetworkServer.IncommingConnection:connect(function(nC)
game.Players.PlayerAdded:connect(function(nP)
for i = 1, #bannedIps do
if nC.Name == bannedIps[i] then nP:remove() else return end
end
end)
end)

^ the script i found on that particular thread.

~I've been to nil and back.
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
11 Jan 2012 08:46 PM
IncommingConnection returns 2 arguments. One is a string, and one is an instance...to my knowledge, in that script, nC would be a string? How would nC.Name work?
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
11 Jan 2012 08:49 PM
not to sure, I'd have to play around with it.

~I've been to nil and back.
Report Abuse
Thunderx10 is not online. Thunderx10
Joined: 17 Jun 2009
Total Posts: 2316
11 Jan 2012 08:50 PM
Nou
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
11 Jan 2012 08:55 PM
:o Incoming Connection returns '127.0.0.1:64053 '

~I've been to nil and back.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
11 Jan 2012 09:02 PM
*Gasp* i tried it on a real server and it did tell me my IP. cooool.

~I've been to nil and back.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
11 Jan 2012 09:05 PM
Through networkserver

    game:GetService("NetworkServer").IncommingConnection:connect(function(ip)
        print(ip)
    end)

­<'+1 Post. Ujelly?'>
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
11 Jan 2012 09:08 PM
IncommingConnection's first argument (or only argument (???)) returns the ip with the port (12.12.12:1234), you can use string manipulation to get what's before the colon.

­<'+1 Post. Ujelly?'>
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
11 Jan 2012 09:36 PM
hmmm... i'm having difficulties manipulating the IP to get rid of the stuff after the colon... string.find() should return the location witch the colon is at in this case shouldn't it? string.sub keeps yelling at me that its a string and not a number

game.NetworkServer.IncommingConnection:connect(function(a)
game.Players.PlayerAdded:connect(function(b)
local display = Instance.new("Hint",Workspace)
local split = string.find(a , ":")
display.Text = "IP: "..string.sub(1,split, a).." Player: "..b.Name
end)
end)

~I've been to nil and back.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
11 Jan 2012 09:42 PM
ipwithport=ip:match(":(%w+)")

­<'+1 Post. Ujelly?'>
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
11 Jan 2012 09:48 PM
ah, cool i keep that one in mind.

~I've been to nil and back.
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
11 Jan 2012 10:19 PM
Just uncopylocked it if you want to see how I store the IP of a particular player. (That place actually saves it to a table, as well as creating a StringValue within the player)

"I WILL GIVE YOU BACON." - Deadmau5
~Scarfacial
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
11 Jan 2012 10:21 PM
Hmm... so many possible applications.
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
11 Jan 2012 10:21 PM
Indeed :P It's quite useful.

"I WILL GIVE YOU BACON." - Deadmau5
~Scarfacial
Report Abuse
thomas0233 is not online. thomas0233
Joined: 29 Nov 2011
Total Posts: 37
22 Feb 2012 07:03 AM
Guess what? Suprise, suprise, ROBLOX Broke incommingconnection in their last update D:
Report Abuse
MetroidSlayer is not online. MetroidSlayer
Joined: 14 Dec 2009
Total Posts: 845
22 Feb 2012 07:23 AM
Yea. The reason why is because the ability to be able to obtain an IP is a security risk. The ability to obtain an IP I do believe has just recently been fixed by the Admins.
Report Abuse
thomas0233 is not online. thomas0233
Joined: 29 Nov 2011
Total Posts: 37
05 Mar 2012 01:01 PM
How can we do that then? What do you mean by "fixed"? Like they unlocked it/
Report Abuse
MetroidSlayer is not online. MetroidSlayer
Joined: 14 Dec 2009
Total Posts: 845
12 Mar 2012 02:07 PM
What I mean by fixed, is that it was not at first designed to allow in-game scripts to access it, so they changed it so that it can not be accessed [Or so i heard]
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
12 Mar 2012 02:18 PM
By the way, 127.0.0.1 is local server (your own computer), it does a loop back to itself.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
12 Mar 2012 02:37 PM
There are a lot of ways to do it. I made one a long time ago but it's lost now. Err..You could search through the forums. A few months back I think I remember a post about it in the Scripters forum..
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image