Barsuk777 Posted November 5, 2019 Posted November 5, 2019 Hi, please tell me, I want to make a tattoo shop as I understand the key function here https://wiki.rage.mp/index.php?title=Player::setDecoration I found all the tattoo collections https://github.com/root-cause/v-tattoos I understand correctly? if you take a tattoo, then to install it on the Player you must specify in player.setDecoration (collection, overlay); collection- is the name of the collection I take them from the name of the files on the github repository overlay- is a hash name as I understand it is different for each gender ---------------------- This is a tattoo from the mpbeach_overlays collection. { "Name": "TAT_BB_019", "LocalizedName": "Tribal Hammerhead", "HashNameMale": "MP_Bea_M_Chest_000", "HashNameFemale": "", "Zone": "ZONE_TORSO", "ZoneID": 0, "Price": 5800 }, -------------------- Now I need to install a tattoo on the male character player.setDecoration ('mpbeach_overlays', 'MP_Bea_M_Head_000'); I get an error Error Expected Number
Guest Posted July 16, 2020 Posted July 16, 2020 JavaScript: player.setDecoration(mp.game.joaat('mpbeach_overlays'), mp.game.joaat('MP_Bea_M_Head_000'));
LT.Steiner Posted July 16, 2020 Posted July 16, 2020 @n0bodysecThere is no way to use Server Command for Decoration?
Freamee Posted July 17, 2020 Posted July 17, 2020 player.setDecoration(mp.joaat('mpbeach_overlays'), mp.joaat('MP_Bea_M_Head_000')); Use it like this, it will work on serverside
Guest Posted July 17, 2020 Posted July 17, 2020 @LT.Steiner well, actually there are two methods for setDecoration. Both for client side and server side. player.setDecoration(...); // Server-Side player.localPlayer.setDecoration(...); // Client-Side And ofc for C# too (function names are the same)
LT.Steiner Posted July 17, 2020 Posted July 17, 2020 (edited) I tried this code, { "Name": "TAT_BB_030", "LocalizedName": "Vespucci Beauty", "HashNameMale": "MP_Bea_M_RArm_001", "HashNameFemale": "", "Zone": "ZONE_RIGHT_ARM", "ZoneID": 3, "Price": 7000 } ----------------------------------------------------------------- /// This Script wont be accept! [Command("tattoo")] public void SettingTattoo(Client player) { player.SetDecoration("MP_Bea_M_RArm_001"); } ----------------------------------------------------------------- /// It will accept in VS, but return me back error in game chat with this input /tattoo MP_Bea_M_RArm_001 [Command("tattoo")] public void SettingTattoo(Client player, Decoration decoration) { player.SetDecoration(decoration); } ----------------------------------------------------------------- Would you mind to send me script Completely that you using for it? someone needed it like me. Edited July 17, 2020 by LT.Steiner
Guest Posted August 11, 2020 Posted August 11, 2020 You're passing a string (SetDecoration expects decoration hash, uint) You should convert to hash using joaat in JS or GetHashKey in C#. Look for an example here:
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now