This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk

Forum rules

Need help with IProfile

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Locked
User avatar
Diamond TH
Fighter
Fighter
Posts: 21
Joined: Fri Sep 14, 2018 10:44 am
Title: Fairplayer
SFD Account: Diamond_TH
SFD Alias: Diamond_TH
Started SFD: May 2015
Location: Russia
Gender:
Age: 22
Contact:

Need help with IProfile

Post by Diamond TH » Sat Oct 27, 2018 2:14 pm

Hello! I am here with new question, that can confuse powerful scripters, cuz it's stupid.
I'm trying to change players clothing to something i want without triggers. But i can't get it to work.
I want something like:

Code: Select all

If(ply.Name == "randomname"){
ply.SetHeadClothingItemColor(blue);
}
But i have no idea how to do this, and i can't understand the Script API page xd
( the code is not correct at all, yah )
0 x
Image - Noob SuperFighter saying

User avatar
ebomb09
Fighter
Fighter
Posts: 13
Joined: Mon Apr 30, 2018 5:04 am
SFD Account: ebomb09
Location: Canada/BC
Age: 24

Post by ebomb09 » Sat Nov 03, 2018 1:14 am

I don't know if you solved it yet but you could do this:

Code: Select all

If(ply.Name == "randomname"){
	IProfile sav = ply.GetProfile();
	sav.Head.Color1 = "ClothingBlue";
	ply.SetProfile(sav);
}
1 x

Locked