Sign in to follow this  
Lunix

/model id (Changed)

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
3 минуты назад, Captien сказал:

Thank you for the tutorial. It helped so much  :D

Glad to:D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.