RepSharpShooter wrote:As I start to model a starship, I thought, "Hey someone's probably going to steal my ship when I'm not around!" But I then realized that I could use the same security as I used in the jedi master unlocking procedure to keep them out.
Theres a region called rs_access. On enter region, it gets the profile name of the person. If it's not my profile name, it will kill the person/detonate a grenade with push = 9999. I could even do thing like poison them or something xD. Whatever would work online though. Now you may ask, "well how do we keep someone from stealing someone else's identity?" The answer is that getProfileName does not get the GameSpy ID of the user. It gets the regular profile name (which IS NOT displayed online if you have a GSID). This means one could use the profile name as a "password" which nobody would know.
How would one pull off such a move? Most of that is German to me...
Fiodis wrote:That explanation is, actually, fairly clear. If you don't understand it I'd recommend learning more advanced LUA coding before you attempt it.
Normally, I would take that and cherish it. But right now, I have a lot submission that has to get out before the end of the month. If it's clear to you, please enlighten me.
Here is all that I don't understand:
Theres a region called rs_access. Do I have to specify that in the LUA? how do I get an "rs_access" region? On enter region, it gets the profile name of the person. Is this the region that does this? Or the LUA command listed below? If it's not my profile name, it will kill the person/detonate a grenade with push = 9999. Is this automatic or do I have to put this in the lua myself? If I do, what is the command?I could even do thing like poison them or something xD. Whatever would work online though. Now you may ask, "well how do we keep someone from stealing someone else's identity?" The answer is that getProfileName<-- Is that what I have to put in the lua? does not get the GameSpy ID of the user. It gets the regular profile name (which IS NOT displayed online if you have a GSID). This means one could use the profile name as a "password" which nobody would know.
In this case, you'll need a crash-course. Assuming you know what OnEnterRegion means (which I think you do), there's a v1.3 patch LUA command that enables you to grab the in-game name of a player. You do have to code for the grenade to go off, perhaps by spawning a self-destructing autoturret at a path point inside the region. I forget the exact wording of the function that gets the player's name, but it's in the v1.3 documentation.
OnEnterRegion(
function(regIn,character)
local name = getProfileName(character)
if name ~= "Genaral Nate" then
MoveEntityToNode(character,"gn_node3")
end
end,
"g_n_only"
)
ActivateRegion("g_n_only")
It doesn't work.
Am I missing anything? I have everything I need for the teleport BTW.
OnEnterRegion(
function(regIn,character)
local name = getProfileName(character)
if name ~= "Genaral Nate" then
MoveEntityToNode(character,"gn_node3")
end
end,
"g_n_only"
)
ActivateRegion("g_n_only")
It doesn't work.
Am I missing anything? I have everything I need for the teleport BTW.
on the second line you misspelt region? unless its meant to be regIn
also on the 4th line you added a symbol in front of the = and misspelt your own name (genaral)
The code seems totally correct to me. I don't know how getProfileName() works so there might be something wrong, everything else seems correct though. ~= is correct, too.
The Error Log wrote:Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to call global `getProfileName' (a nil value)
stack traceback:
(none): in function <(none):32>
I think it speaks for it's self.
Does anyone know the correct command for getting the name of a player?
ActivateRegion("g_n_only")
OnEnterRegion(
function(regIn,character)
local name = uf_processPlayers(character)
if name ~= "Genaral Nate" then
print("OnEnterRegion():",name)
MoveEntityToNode(character,"gn_node3")
end
end,
"g_n_only"
)
The only bad part it that it teleports me even if my name is "Genaral Nate" And it pops up with this jewel:
You are, but did you even look at the doc I pointed you to? I won't bother posting it, as it is somewhat lengthy. But look at it yourself, and the example code there.