Jump to content

Recommended Posts

Posted (edited)

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

Edited by Lunix
  • Like 3
Posted
1 час назад, Wimps сказал:

skins 666, there are those for whom the game all options are present, such as 'slod_large_quadped'

I know I did a tutorial on the list provided to me, it is not likely to appear in the skins of those who is a pirate version, and they quite simply have not patched

Posted (edited)

i know mp.joaat stands for an array. But why is it called "mp.joaat"? :S

Edit:

Nvm. I am gonna learn JS

 

Edited by Zim
Posted
1 час назад, Zim сказал:

i know mp.joaat stands for an array. But why is it called "mp.joaat"? :S

Edit:

Nvm. I am gonna learn JS

 

I'm not sure, but like "joaat" refers to an appeal to the hash, ie it takes its name, and instead inserts its code value (hash). I could be wrong but it seems so

  • 10 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...