Correct way to get player skin name from the server

Discussions about Coding and Scripting

Correct way to get player skin name from the server

Postby iloveut99 » Sun Jun 24, 2012 11:58 am

Hello,

Somebody knows a simple way to get the skin name of a client in the server?

I'm using right now
Code: Select all
p.GetDefaultURL("Skin")
(where p is a TournamentPlayer), but seems that it doesn't work in a server, just in practice section.

Code: Select all
p.MultiSkins[].name
seems to only retrieve the name of the skin, not the package name.

Thanks.
iloveut99
Skilled
 
Posts: 223
Joined: Mon Aug 16, 2010 10:25 pm

Re: Correct way to get player skin name from the server

Postby Feralidragon » Sun Jun 24, 2012 2:47 pm

Well, you can try:
Code: Select all
String(p.MultiSkins[])

That should get you something like: Texture'SomePackage.SomeTex'

I am not sure though, but since I use logs many times for debugging, I use something like "log(SomeActorOrClass)" and it always prints the full thing, so I assume "log" makes a string coersion (by calling the internal toString() getter of the object) and String(something) must do the same thing. Just assuming though, but give it a try.
User avatar
Feralidragon
Site Staff
 
Posts: 3708
Joined: Wed Feb 27, 2008 6:24 pm
Location: Portugal - Lisbon
Personal rank: The Unreal Boy

Re: Correct way to get player skin name from the server

Postby JackGriffin » Sun Jun 24, 2012 3:32 pm

When players join you get lines like this:
Login request: Index.unr?Name=pucka?Class=MultiMesh.TSkaarj?team=1?skin=tskmskins.MekS?Face=tskmskins.Disconnect?Voice=MultiMesh.SkaarjVoice


The proper replicated values are MeshName, SkinName, and FaceName. Grab those and you ought to see what you need. It's just as easy though to look at the logs. Oh, and mods like Val Av or Dane's Skin Changer can obviously override the player's chosen settings.
/away for now.
JackGriffin
Godlike
 
Posts: 1732
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Retired as of Sep-11

Re: Correct way to get player skin name from the server

Postby iloveut99 » Sun Jun 24, 2012 5:21 pm

Feralidragon tip worked fine:
Code: Select all
string(p.MultiSkins[0])


:)

JackGriffin I thought in that log but what I could find more similar was ProcessServerTravel in GameInfo class. Where is that log being written?
iloveut99
Skilled
 
Posts: 223
Joined: Mon Aug 16, 2010 10:25 pm

Re: Correct way to get player skin name from the server

Postby JackGriffin » Sun Jun 24, 2012 5:30 pm

That's the main feed from the UCC.log.
/away for now.
JackGriffin
Godlike
 
Posts: 1732
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Retired as of Sep-11

Re: Correct way to get player skin name from the server

Postby iloveut99 » Sun Jun 24, 2012 5:46 pm

I meant the class that was writing it. :lol: :tu:
iloveut99
Skilled
 
Posts: 223
Joined: Mon Aug 16, 2010 10:25 pm

Re: Correct way to get player skin name from the server

Postby JackGriffin » Sun Jun 24, 2012 6:26 pm

I took a quick glance through the public source and I don't see it. It may be native code creating the log file.
/away for now.
JackGriffin
Godlike
 
Posts: 1732
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Retired as of Sep-11

Re: Correct way to get player skin name from the server

Postby iloveut99 » Sun Jun 24, 2012 11:32 pm

JackGriffin wrote:I took a quick glance through the public source and I don't see it. It may be native code creating the log file.


Yeah you may be right.

When you say to I use the replicated variables MeshName, SkinName, and FaceName you mean to I get them (at least skin name) from the function
Code: Select all
GetMultiSkin( Actor SkinActor, out string SkinName, out string FaceName )
right? I will probably continue with Feralidragon method however.
iloveut99
Skilled
 
Posts: 223
Joined: Mon Aug 16, 2010 10:25 pm

Re: Correct way to get player skin name from the server

Postby JackGriffin » Mon Jun 25, 2012 1:39 am

In a decision over who to listen to ALWAYS listen to Ferali versus anyone else. My money is on him.

The values I listed are simply the replicated variables that the player sends to the server. Neither is wrong, but I prefer to grab default values when I can. Certain mods could reassign the multiskins (like I said above) and using defaults will always let you see what the player has chosen to use.
/away for now.
JackGriffin
Godlike
 
Posts: 1732
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Retired as of Sep-11

Re: Correct way to get player skin name from the server

Postby iloveut99 » Mon Jun 25, 2012 1:51 am

Oh ok got it. Yes in this case I need to check what's the actual skin and not the what the player chose I believe.
iloveut99
Skilled
 
Posts: 223
Joined: Mon Aug 16, 2010 10:25 pm


Return to Coding, Scripting

Who is online

Users browsing this forum: No registered users and 1 guest