|
| 27 Nov 2012 06:46 PM |
| How would I find the Player's name with their id? |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 06:52 PM |
id = 0000
function findPlyr() p=game.Players:GetChildren() for i =1,#p do if p[i].userId==id then return p[i] end end return false end
Player = findPlyr() print(Player.Name) |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 06:52 PM |
| I don't think that a person's Id connects to their name, or that there is any method for doing so. |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Nov 2012 06:54 PM |
Well, yes that would work. But I'm trying to locate the creators name through Id. :I
local m = Instance.new("Message", Workspace) m.Text = "Owner is "..game.CreatorId
How would I change that to it's name. :I |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:00 PM |
if player.userId == 34810416 then print 'blueboy here bro' end
- thedestroyer115 |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:00 PM |
Oh, nevermind. Interesting question.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:02 PM |
| The method for something like GetPlayerFromId is locked :l |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:03 PM |
Well, yes. That would work. But, I am not trying to use a PlayerAdded function. I am making a free model and I want credit. So, I am making a hint saying "owner thanks blueboy167thst for his model".
Is this possible? |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:05 PM |
| Well you'd have to find the CREATOR's ID, not just any random one... |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:05 PM |
I know that. This does that:
game.CreatorId
:I |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:21 PM |
function IfMyGame(id) if game.CreatorId == id then return true else return false end end
if IfMyGame(idhere) then return else local m = Instance.new("Message") m.Text = "Text here"
something like that?
nyan nyan nyan |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:22 PM |
He wants to be able to have an Id of a player, and find that players name.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:23 PM |
dood u JUST DID SOME THING USELES!!!! AERGeadfhzsafdrtd
dats liek umg dats liek an if statement compleximized dood.
if game.CreatorId == id then --U IDOT U GET DA DAMN BOOL HERE!!!!!!!!!
QWER24WYHTGFAQGFNRTGF5DCJKVNFJGHGDDSFHD |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:25 PM |
No one understand you blueboy. Lol'd.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:29 PM |
:I I don't find it hard to understand. I want to know how to find a player's name using their Id. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:35 PM |
function findID(id) for _,player in pairs(game.Players:GetPlayers()) do if player.userId == tonumber(id) then return player.Name end end end
print(findID(game.CreatorId)) |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:35 PM |
| But what if the player is not in game? |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 27 Nov 2012 07:39 PM |
than it should still work just use tostring |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:40 PM |
lolno stupid.
trool > little ugly peice of gnofme [ Content Deleted ] |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:40 PM |
^ Get out troll.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Nov 2012 07:42 PM |
just do this:
H = Instance.new("Hint", Workspace) H.text = This model was created by: blueboy167thst
(Been away from Lua for awhile but this might work. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:43 PM |
might ~= does
dat code failed asdly :l |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2012 07:44 PM |
@Chop I was talking to wowgnomes.
- thedestroyer115 |
|
|
| Report Abuse |
|
|