Jump to content

Mod


Bostjan96

Recommended Posts

I need help with mod plss. writes: Resource could not be found

mta.xml:

<?xml version="1.0"?>

-

carpack:

function replaceModel()

txd = engineLoadTXD("car/feltzer.txd", 533 )

engineImportTXD(txd, 533)

dff = engineLoadDFF("car/feltzer.dff", 533 )

engineReplaceModel(dff, 533)

end

addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel)

addCommandHandler ( "reloadcar", replaceModel )

plss for help!!

Link to comment
  • Discord Moderators

Why's there a hyphen in your meta?


Above should do it. files specified are always transferred to client. I don't think the ordering of script src/type plays any role, but as I'm not completely sure you can leave it in the general order.

If you open console (default ~ or F8) upon starting a resource, it will display any loading issues. It will tell you if it's a script or a meta.xml matter.

Also, you specified incorrect files in your meta. In your script you attempt to load car/feltzer.txd and car/feltzer.dff but in your meta you specify banshee.txd and banshee.dff. I don't know which is right, but in case it's the script one, that's another reason for your resource to fail loading.

Link to comment

carpack.lua :

function replaceModel()  
  txd = engineLoadTXD("car/feltzer.txd", 533 ) 
  engineImportTXD(txd, 533) 
  dff = engineLoadDFF("car/feltzer.dff", 533 ) 
  engineReplaceModel(dff, 533) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 
  
addCommandHandler ( "reloadcar", replaceModel ) 

meta.xml:

type="script" version="1.0" author="|ES|Bostjan"/> 

resource name: BMW

Link to comment
  • Discord Moderators

What doesn't work?

Do you have both feltzer.txd and feltzer.dff in the folder car within your resource?

If yes, what does it say in console (F8 or ~) when you start the resource?

If the resource loads, open debugscript 3 and note any warnings/errors that might occur.

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