Jump to content

Problem engineLoad


WASSIm.

Recommended Posts

Posted

hi guys i have problem with engineLoadTXD and engineLoadDFF. is show me this

Load error @ 'engineLoadTXD [unable to load 'weapon/sniper.txd']

Load error @ 'engineLoadDFF [unable to load 'weapon/sniper.dff']

Omerta Roleplay

Posted
Maybe it's crashed or something?

no. old its show that debug but working and my new function not working

function engineLoadModel ( theFileTXD, theFileDFF, ID, enable ) 
    local enable 
    if enable == nil then enable = true end 
    if ( enable ) then 
        if ( theFileTXD ) then 
            if not fileExists ( theFileTXD ) then 
                local txd = engineLoadTXD(theFileTXD..".txd", true) 
                if ( txd ) then 
                    engineImportTXD(txd, ID) 
                end 
            end 
        end 
        if ( theFileDFF ) then 
            if not fileExists ( theFileDFF ) then 
                local dff = engineLoadDFF(theFileDFF..".dff", ID) 
                if ( dff ) then 
                    engineReplaceModel(dff, ID) 
                end 
            end 
        end 
    end 
end 
  
--in other script 
exports["export"]:engineLoadModel ("weapon/sniper","weapon/sniper", 358) 

Omerta Roleplay

Posted

I makes it by another way I didn't noticed the error in you're script but try this just change weapon name and location

local weapons = {{fileName='weapon', model=34},} 
function load() 
for index, weapon in pairs(weapons) do 
tex = engineLoadTXD ( ''..weapon.fileName.. '.txd', weapon.model ) 
engineImportTXD ( tex, weapon.model ) 
mod = engineLoadDFF ( ''..weapon.fileName.. '.dff', weapon.model ) 
engineReplaceModel ( mod, weapon.model ) 
end 
end 
addEventHandler('onClientResourceStart',resourceRoot, 
function () 
setTimer ( load, 5000, 1) 
end) 

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

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