Jump to content

Dirk

Members
  • Posts

    3
  • Joined

  • Last visited

Dirk's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Dirk

    two questions

    I got it working now I think the problem was in TxdWorkshop in the image properties. It renames the image to whatever the file extension the image was or if you insert a template it names it the width and height of the template.So I just changes it back to what it was originally called and it works perfectly. Thank you for the reply's..
  2. Dirk

    two questions

    Thanks for the reply.. The collision file works now but the texture still doesn't load.. When I try to Embed the .col in gmax I get an error '--Unable to convert: undefined to type: Integer' so I just export them separately.
  3. Dirk

    two questions

    Hello I have two questions about replacing a model. I just started playing MTA about two weeks now so I'm new to scripting. First: I can get the model to show up in the game with the collision working but when I add the texture to the code the texture wont load along with the collision so I think I'm doing something wrong in GMAX I use txdworkshop to make the TXD I took this code straight from the wiki meta.xml <meta> <info author="YourName" type="script" name="My Server" description="My first MTA DM server" /> <script src="server.lua" /> <script src="client.lua" type="client" /> <file src="Model.dff" /> <file src="Model.col" /> <file src="Model.txd" /> </meta> client.lua function ReplaceObject ( ) col = engineLoadCOL( "Model.col" ) dff = engineLoadDFF( "Model.dff", 0 ) --modelid is everytime 0, when you replace no vehicle txd = engineLoadTXD ( "Model.txd" ) engineImportTXD ( txd, 1337 ) engineReplaceCOL( col, 1337 ) engineReplaceModel( dff, 1337 )-- replace the model at least end addEvent ( "replaceObj", true ) addEventHandler ( "replaceObj", getRootElement(), ReplaceObject ) server.lua function ReplaceCommand ( ) triggerClientEvent( "replaceObj", getRootElement(), replaceObj ) end addCommandHandler( "replace", ReplaceCommand ) Second: How do I make the resource load the new models automatically when it starts I tried 'onResourceStart' and get no errors but it still wont work????
×
×
  • Create New...