Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Player outfit problem

Share questions, scripts and tutorials related to the ScriptAPI in SFD.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
Astolfo
Fighter
Fighter
Posts: 13
Joined: Tue Jan 21, 2020 9:00 pm
Started SFD: I forgot

Player outfit problem

Post by Astolfo » Thu Feb 04, 2021 4:31 pm

I have a script that changes the player's clothing, but it is not suitable for the female gender.

Code: Select all

public void h(TriggerArgs args)
{
	if (args.Sender is IPlayer) 
	{
		IPlayer plr = (IPlayer)args.Sender;
		IProfile profile = plr.GetProfile();
		profile.ChestUnder = new IProfileClothingItem("Shirt", "ClothingWhite");
		profile.ChestOver = new IProfileClothingItem("Coat", "ClothingWhite", "ClothingDarkRed");
		profile.Legs = new IProfileClothingItem("Pants", "ClothingWhite");
		profile.Feet = new IProfileClothingItem("Shoes", "ClothingWhite");
		plr.SetProfile(profile);
	}
}
0 x
Hello world

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1884
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 34

Post by Gurt » Thu Mar 18, 2021 6:45 pm

Female items are often named with the suffix "_fem". You can see this in the Data/Items folder within the game's content.
0 x
Gurt

Post Reply