Jump to content

need to help


iiiSolom

Recommended Posts

  • Administrators

Hello. You can use the function engineReplaceModel for replacing an existing object ID with your custom object. Below is an example script which I personally use on my local development server.

col = engineLoadCOL ("9504.col")
engineReplaceCOL (col, 9504)
txd = engineLoadTXD ("9504.txd")
engineImportTXD (txd, 9504)
dff = engineLoadDFF ("9504.dff")
engineReplaceModel (dff,9504,true)

^file is "replace.Lua"

The ,true enables alpha transparency. If your model doesn't use alpha you should not have to include it.

 

<meta>
	<info type="misc" name="models" author="yourname" description="custom models for my server" version="1.5" />

	<file src="9504.col" />
	<file src="9504.txd" />
	<file src="9504.dff" />
<script type="client" src="replace.Lua" />
</meta>

^file is "meta.xml"

Simply create those 2 resource files in your resource folder and export the dff, txd, col models there.

  • Like 1
Link to comment
4 hours ago, Tut said:

مرحبا. يمكنك استخدام وظيفة engineReplaceModel  لاستبدال معرف كائن موجود بكائن مخصص. فيما يلي مثال للنص البرمجي الذي أستخدمه شخصيًا على خادم التطوير المحلي.


  
  
  
  
  
 

^ الملف هو "replace.Lua"

و  ، صحيح  تمكن ألفا الشفافية. إذا كان نموذجك لا يستخدم ألفا ، فلا يجب عليك تضمينه.

 



	      

	  
	  
	  
   

^ الملف هو "meta.xml"

ما عليك سوى إنشاء ملفي الموارد هذين في مجلد الموارد وتصدير نماذج dff و txd و col هناك.

thank you bro ❤️

Link to comment

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...