PDA

View Full Version : GetPlayerName?



Edward
10-20-2003, 08:03 AM
Hi!
Is there a COG verb where you can get the player name? Like:

If(GetPlayerName(player)=="Edward")
{
Alow him to enter his own room
}

/Edward

gbk
10-20-2003, 08:20 AM
No. GetThingUserData() is about as close as your gonna get to user-applied names.


Didnt you start a similar thread a week ago?

------------------
Fight the future (http://12.220.251.111/ol/cogpad/cogpad.html).

Checksum
10-20-2003, 08:39 AM
jkStringConcatPlayerName(player);

I know it'll return a player name, I just don't know if you can compare it against anything.

------------------
Duel Zero (http://forums.massassi.net/html/Forum5/HTML/010438.html) key count: Zero! Down to guns and forces. Expect a release soon.

gbk
10-20-2003, 09:04 AM
Thats just the player name that is defined when you run JK, and it asks for a player name... Yeah, that player name. COnsidering mine are all called "sys0" and "sys1a" and the like, and Id imagine everyone else's is similar, it isnt going to do you any good.

------------------
Fight the future (http://12.220.251.111/ol/cogpad/cogpad.html).

Edward
10-20-2003, 09:43 AM
Yes, I had a similar topic, where I asked if I could find out about the Character name.
Now I'm wondering if I can compare the player name. I don't want people without the proper name to Barge into my JK room.
jkStringConcatPlayerName(player); just sets the player name ready to be printed on the screen.

I'll have a look at the GetThingUserData...

/Edward

Edward
10-20-2003, 09:47 AM
OK, read through it...

<font face="Verdana, Arial" size="2">DataMaster:
Returns the user data of a thing. Syntax:
userdata=GetThingUserData(thing);
</font>
traveled to Thing UserData

<font face="Verdana, Arial" size="2">
All things have a user data assigned to them. By default it is 0. The user data was created so that the "user" could store values with a thing. It can be very useful for attaching values to players. Since the user data is often used by patches, the author recommends that level authors abstain from using the user data of common things like the player.
</font>
Absolutely hopeless...
IS THERE NO PRIVACY IN THIS GAME?

/Edward


[This message has been edited by Edward (edited October 21, 2003).]

lucky_jackpot
10-21-2003, 12:54 AM
Hi there http://forums.massassi.net/html/smile.gif

Sorry if this is stating the obvious (both to Edward and everybody) but the question has to be asked ... "why not just use a password protected game?" http://forums.massassi.net/html/wink.gif

http://forums.massassi.net/html/biggrin.gif

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

Edward
10-21-2003, 03:21 AM
Well, I want anyone to join the level, but noone may enter my room unless they're invited...

But I guess... I'll let anyone in...

/Edward

Checksum
10-21-2003, 11:15 AM
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Thats just the player name that is defined when you run JK, and it asks for a player name... Yeah, that player name. COnsidering mine are all called "sys0" and "sys1a" and the like, and Id imagine everyone else's is similar, it isnt going to do you any good.

</font>

GBK, no it doesn't, WTF are you talking about?

Use it in a string, it'll print the name of the player.

Like if your player was named GBK, and I used that verb, it'd return GBK.

You should know this already.

------------------
Duel Zero (http://forums.massassi.net/html/Forum5/HTML/010438.html) key count: Zero! Down to guns and forces. Expect a release soon.

gbk
10-21-2003, 01:56 PM
<font face="Verdana, Arial" size="2">Originally posted by Checksum:
GBK, no it doesn't, WTF are you talking about?</font>

Um . . . disreguard that post . . I was . . umm . . wacked out on something . . I dont even remember making it . . .

------------------
Fight the future (http://12.220.251.111/ol/cogpad/cogpad.html).

Edward
10-21-2003, 02:44 PM
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Um . . . disreguard that post . . I was . . umm . . wacked out on something . . I dont even remember making it . . .

</font>

weed?

gbk
10-21-2003, 07:13 PM
Yeah. Weed. Just weed.

------------------
Fight the future (http://12.220.251.111/ol/cogpad/cogpad.html).

lucky_jackpot
10-22-2003, 12:59 AM
And GBK's one of our forum moderators? And one of our community's finest coggers? Leading by an example I see... (although I refuse to pass judgement on a fellow cogger, so for now GBK, you're absolved...) http://forums.massassi.net/html/wink.gif http://forums.massassi.net/html/biggrin.gif

-Jackpot

PS: GBK's new sig: "Leading by example - blame weed. Just weed." http://forums.massassi.net/html/wink.gif

PPS: Beware the side effects of said drug http://forums.massassi.net/html/wink.gif http://forums.massassi.net/html/redface.gif

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)