Nov 1, 2024, 04:36:35
Ownage Owls

Author Topic: A lil' question  (Read 7773 times)

Mar 17, 2011, 21:43:48
Read 7773 times
Offline

Tom_Riddle


I never expected to ask in here but since the MTA Forum was no real help I thought I could do so.





So let's keep this short. I am working on a little map and I neeed custom objects for it. I created the object with 3DS Max and exported it as a *.dff. Also I created a *.col file based on this object. But I really can't get this working. I tried it like 20 times on many different ways with many different scripts, sometimes the objects were visible, but not totally solid.

This is the script I used to import the object:

(it's client side)

Code: [Select]
function replaceModel()
dff = engineLoadDFF("pipe.dff", 1777 )
engineReplaceModel(dff, 1777)
col = engineLoadCOL ( "pipe.col" )
engineReplaceCOL ( col_floors, 1777 )
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel)


This is my meta.xml file:

Code: [Select]
<meta>
    <script src="client.lua" type="client" />
    <script src="server.lua" type="server" />
    <file src="pipe.dff" />
    <file src="pipe.col" />
    <info gamemodes="*****" type="*****" name="*****" author="********" version="*****" />
    <map src="******" dimension="0" />
    <settings>
        <setting name="#minplayers" value="[ 0 ]" />
        <setting name="#maxplayers" value="[ 128 ]" />
        <setting name="#gravity" value="[ 0.008000 ]" />
        <setting name="#weather" value="[ 1 ]" />
        <setting name="#time" value="23:0" />
        <setting name="#locked_time" value="[ false ]" />
        <setting name="#waveheight" value="[ 0 ]" />
        <setting name="#gamespeed" value="[ 1 ]" />
    </settings>
</meta>


And here you can download the objects (   source) and the script.





I would say something is wrong lol, if somebody could help me I would really appreciate that.