Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Getting Player Name.
Getting Player Name.
2002-07-11, 12:41 PM #1
Is it possible to geta players name during a mp game, and then use it in a print function?

------------------
//CoCoNuT
2002-07-11, 1:15 PM #2
Welcome to Massassi SGT_CoCoNuT. Here's a sample cog (unless you want to change the dying message thats in the JKstrings.uni [http://forums.massassi.net/html/smile.gif] )
Code:
# Sample cog for SGT_CoCoNuT
#
# [DP]
#
symbols
thing       target
surface     switch
message     activated
end
# ........................................................................................
code
Activated:
   If(GetSenderRef() != switch) Return;
   target = GetSourceRef();
   jkStringClear();
   jkStringConcatPlayerName(target);
   jkStringConcatSpace();
   jkStringConcatASCIIString("has activated the switch");
   jkStringOutput(-3, -1);
   Return;
end
Hope this helps. [http://forums.massassi.net/html/smile.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

[This message has been edited by Descent_pilot (edited July 11, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-11, 1:48 PM #3
Well gee, all you had to say was "JKstringconcatplayername()"... [http://forums.massassi.net/html/confused.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-07-11, 2:44 PM #4
lol, i said function(im still thinking javascript). Thanks guys, but how do i put "JKstringconcatplayername()" into a print, for a simple example:

symbols

sector sec
message entered

end

code

entered:

Print("*name here* entered a sector that ill specify in JED.");

return;

end
2002-07-11, 4:38 PM #5
Code:
# Sample cog for SGT_CoCoNuT, modified for entered message
#
# [DP]
#
symbols
thing       target
sector      sector
message     entered
end
# ........................................................................................
code
Entered:
   target = GetSourceRef();
   jkStringClear();
   jkStringConcatPlayerName(target);
   jkStringConcatSpace();
   jkStringConcatASCIIString("has entered the sector This can be changed!");
   jkStringOutput(-3, -1);
   Return;
end
When entered the sector, the string should print with the players name. OH and GBK, an example can be a big help. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-12, 4:46 AM #6
A year ago, I would have agreed with you, but now, after 10k cogs, and a hand full of blisters, I can safely say, "THE VERB IS PLENTY ENOUGH".


Thank you gentlemen, and goodnight.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-07-12, 12:12 PM #7
Thanks guys, works great.

------------------
//CoCoNuT

↑ Up to the top!