Hello. For the lazy and I do not know, give a little tutorial how to use id
PS This tutorial is desirable for a pure server.
So, let's begin!)
To get started in the "events" create a file "skin.js"
Then we declare a global variable
global.ped =
{
};
Then take out the list of our skins, I took only the animals
global.ped =
{
skin: mp.joaat(["A_C_Boar",
"A_C_Chickenhawk",
"A_C_Chimp",
"A_C_Chop",
"A_C_Cormorant",
"A_C_Cow",
"A_C_Coyote",
"A_C_Crow",
"A_C_Deer",
"A_C_Fish",
"A_C_Hen",
"A_C_Husky",
"A_C_MtLion",
"A_C_ig",
"A_C_igeon",
"A_C_Rat",
"A_C_Retriever",
"A_C_Rhesus",
"A_C_Rottweiler",
"A_C_Seagull",
"A_C_SharkTiger",
"A_C_shepherd")]
};
I apologize for this ugly code)) in the description I'll leave the file with a complete list of skins))
Then go to the folder "commands" in "basiccommands.js" file
We are looking for the string "model": (player, args) => and replace command
"model": (player, args) =>
{
if (args[1] >= 723)
{
player.outputChatBox("Use /model 0-722");
}
else if (args[1] >= 0 || args[1] <= 722)
{
player.model = ped.skin[args[1]];
}
else if (typeof args[1] === 'string')
{
player.outputChatBox("Use /model 0-722");
}
},
1. We checked for correct input id skin
2. If you enter /model 0 the output functions player.model = ped.skin [args [1]];
3. If you enter /model A_C_Boar the output error player.outputChatBox("Use /model 0-722");
It was decided to withdraw a mistake because can ruin, using say /model infernus
And so, what we have: when you type the command "/model 0" we will give the skin a boar
If you somehow liked the tutorial support a good comment
Sorry for my English, an interpreter))
skin.js - https://yadi.sk/d/rNFgkcpm36n3dV
Help in correcting code CocaColaBear