|
Hello, you've clicked on the post of crazypotato4, one of the most awesomest people evar. TL;DRs and trolls not welcome.
RLR (Reading Level Required): [78%] (High) : scripting talk and quite a few big words are in the following post.
==========
[1] The function.
-----
I'm suggesting a new function called GetInstancePlayer. This would be a member of game.Players, and would take an integer as the argument, this integer being the userId of a player. Documentation would show it like this:
instance Players::GetInstancePlayer(int userId)
And it would be used like this:
game.Players:GetInstancePlayer(number)
==========
[2] What would it do?
-----
This function would return a Player that corresponds to the userId you put in the function, so, if you were to do this:
Player = game.Players:GetInstancePlayer(261)
Then 'Player' would new be equal to Telamon's Player object.
If the Player that you retrieve is already in the game, then it returns that Player, but if the Player isn't in the game, then it returns a slightly changed version of the Player. The changes would be:
1. The Parent property would be locked. This way, you can't try to hax the game or anything by doing weird stuff with the Player.
2. There would be one more function added to the Player: isOnline. This would return a boolean saying whether or not the Player is online. Documentation would look like:
bool Player::isOnline()
It would be used:
game.Players:GetInstancePlayer(261):isOnline()
This would allow you to see if the Player is online or not (duh). Not sure how this would be useful, but whatever, why not just add it? I'm sure others would find a use for it, like being able to see when Telamon is online by doing stuff in their command bar. That way, he'd have even more stalkers :P
==========
[3] Why?
-----
You may be wondering why this is useful. There's quite a few good uses for this:
1. Data Persistence/Data Saving: You could access stuff that's saved to certain Players, like if you saved someone as Banned and you want to undo it. Obviously, you couldn't undo it while they're in game, 'cause unless you have a terrible admin thingy, the person isn't gonna be able to enter your game.
game.Players:GetInstancePlayer(12345):SaveBoolean("Banned", false)
Now whoever has the userId of 12345 is unbanned from my game :D
Also, we can make Data Persistence simulate not being PUPP (Per-user-per-place).
game.Players:GetInstancePlayer(game.CreatorId):LoadString("BannedList")
game.Players:GetInstancePlayer(game.CreatorId):SaveString("BannedList", [[ROBLOX;Stealth Pilot;Telamon;builderman;Brighteyes]])
olololol im banning all da adminz frum my plaic
2. Social functions: You may want to check if people have the creator of the game as their best friend (or maybe the other way around, I haven't really figured it out yet). Currently, you can only check if the creator is best friends with a player that's in the game. With this, you'd be able to check both ways, even if the game creator isn't in the game.
if game.Players:GetInstancePlayer(game.CreatorId):IsBestFriendsWith(game.Players.Player.userId) then
print("u have me on ur best friend list")
end
3. BECUZ I SED SO: srsly. i said so, nao gimme supportz.
==========
[4] If you haven't understood any of the above stuffs
-----
Sorry if you're not a scripter, here's a shorter, simplified version of the idea:
There should be a new function called 'GetInstancePlayer' that allows us to get a Player object from the userId of someone. This is useful because we can unban people that we permabanned using Data Saving, or make a banned list that we can edit across servers. We can also check if someone is the best friend of the game's creator. The Player that this would give us is different from normal Players; you can't change the Parent of the Player (you can't move it into Workspace or Lighting or anything) and you can check if this Player is online (you wouldn't need that for a player that's in your game, 'cause anyone in your game is obviously online).
==========
[5] If you read the entire post up to this point:
-----
Here's a cookie. Now support the idea.
==========
Discuss. |
|
|
TL;DR
You aren't the epicest person evar.
Nobody is PERFECT |
|
|
h = Instance.new("Hint",workspace)
p = 0
for i=1,math.huge do
wait()
p = p+1
h.Text = "Support "..p.."%"
end |
|
|
@TheCupcaik: NO U
@Oozle: Thanks :D |
|
|
zeke505Join Date: 2008-05-26 Post Count: 15765 |
Suppoart.
Btw, hai potato. |
|
|
|
|
Just because I have nothing else to do..
h = Instance.new("Hint",workspace)
h.Name = "Percent"
p = 0
function addNewHint()
hint = Instance.new("Hint",workspace)
h.Name = "Percent"
end
for i=1,math.huge do
wait()
if (workspace:findFirstChild("Percent") == nil) then
addNewHint()
else
if (workspace.Percent.className ~= "Hint") then
addNewHint()
end
end
p = p+1
h.Text = "Support "..p.."%"
end
HAH, NOW IF YOU REMOVE IT YOU GET SPAMMED >:U |
|
|
workspace.Script.Disabled = true
for i,v in next,workspace:children() do
if v.Name == "Percent" then
v:Remove()
end
end |
|
|
I used for i=1,math.huge do not while true do >:3 |
|
|
So? Disable the script and the code stops. |
|
|
Oh right, it uses the variable 'p'...
I've been defeated ;~; |
|
|
The variable doesnt matter. I disabled the code. |
|
|
I MUST BRING OUT THE PCALL() CANNONS!
..Nah, I finally found something to do now anyway :u |
|
|
|
OMG ITS RAINING IN MY MINE CRAFT WORLD
BUMP |
|
|
|
You are bumping the thread wrong... This is a scripting related thread so you do this:
Thread:RequestBump() |
|
|
AAAAAAAAAAAAAAAGGGGHHHHH!!!!!
TOO MANY SCRIPTING WORDS!
TOO MANY SCRIPTING NERDS!
I CAN'T TAKE IT!!!!!
Oh well I guess more scripting stuff=better games.
I like it even if I didn't understand a word of it. |
|
|
@Notunknown: Requesting something implies that you're asking something of someone of a higher status than you. I am moar epical than whatever magical force bumps these threads, so I don't request bumps.
Thread:DemandBump()
:P |
|
zeke505Join Date: 2008-05-26 Post Count: 15765 |
Thread:DemandBump()
c: |
|
|
zeke505Join Date: 2008-05-26 Post Count: 15765 |
Thread:Bump()
Right thar is always a bump cus thar b no choice. |
|
|