| |
|
Skyman772
|
  |
| Joined: 20 Mar 2012 |
| Total Posts: 9305 |
|
|
| 07 Dec 2015 01:12 PM |
| Pretty sure that isn't possible. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:15 PM |
It's possible. However, you need to use HttpService and you'll need the name of the player along with a proxy that supports the API. Here's the link to the wiki article that mentions it.
http://wiki.roblox.com/index.php?title=Web_APIs#Get_ID_from_username |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:17 PM |
| Depends, is it when the player leaves, or use a id with a username |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:35 PM |
| TheBen, you don't need httpservice to use that? Rob lox made the API for it :P |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:37 PM |
| The API only works with HttpService which is why I mentioned HttpService. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:42 PM |
| I don't know how to do this :/ |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:43 PM |
| http://wiki.roblox.com/index.php?title=Sending_HTTP_requests |
|
|
| Report Abuse |
|
|
iMung
|
  |
| Joined: 11 Jul 2013 |
| Total Posts: 328 |
|
|
| 07 Dec 2015 01:43 PM |
| local I = Instance.new("IntValue", game.ServerStorage) game.Players.PlayerRemoving:connect(function(player) I.Value = player.userId end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Dec 2015 01:46 PM |
| @TheBen, links don't help me |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:49 PM |
@iMung no. that is a horrible way of doing it
local http = game:service("HttpService") function getUID(pName) return http:JSONDecode(http:GetAsync(("http://api.rproxy.pw/users/get-by-username?username=%s":format(pName))))["Id"] end print(getUID("NetworkReplicated"))
That will print my UID (probably, testing it now) |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:50 PM |
local http = game:service("HttpService") function getUID(pName) return http:JSONDecode(http:GetAsync(("http://api.rproxy.pw/users/get-by-username?username=%s"):format(pName)))["Id"] end print(getUID("NetworkReplicated"))
--/\ Use that --make sure to enable HttpService |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:53 PM |
How did you learn HttpService Network?
Something I can't comprehend.. Ive tried so many tutorials and articles. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 01:59 PM |
/\ Trial and error.
Here is how it works:
(HttpService needs to be enabled)
First, at the top of your script, make a global variable called 'http' (not needed, just makes it easier) local http = game:service("HttpService") There. Now, you need to get something. Get requests are the most common, this is like going to that site in your browser.
Do this through the method:
http:GetAsync("http://www.google.com")
That will get you the HTML source code for google.
You can print it with: local google_html = http:GetAsync("http://www.google.com") print(tostring(google_html))
There are other types, but that is the basic. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 02:04 PM |
| I know that but how would I use the html to get things like, if I wanted to get someones Last Tweet on twitter? idk how to go through the html to get it |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 02:32 PM |
| For twitter's person last tweet, you can use Twitter's API, or even use string.match |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 07 Dec 2015 02:44 PM |
lol
http://wiki.roblox.com/index.php?title=API:Class/Players/GetNameFromUserIdAsync http://wiki.roblox.com/index.php?title=API:Class/Players/GetUserIdFromNameAsync |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 02:47 PM |
Thank god someone who actually knows this posted Im honestly dissapointed lol |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Dec 2015 02:50 PM |
Then why didn't u guys post it?
|
|
|
| Report Abuse |
|
|
|
| 07 Dec 2015 02:50 PM |
Because i just came on this forum I was just about to then i realized chim already posted it |
|
|
| Report Abuse |
|
|