Jump to content

Restoring infernus on mapstart


Sex*

Recommended Posts

function ResetModel ( ) 
    engineRestoreModel ( 411 ) 
end 
  
addEvent ( "restoreClientModel", true ) 
addEventHandler ( "restoreClientModel", getRootElement(), ResetModel ) 
addEventHandler("onClientMapStarting",getRootElement(), ResetModel) 

Edited by Guest
Link to comment

Try this:

  
function mod() 
  txd = engineLoadTXD("infernus.txd") 
  engineImportTXD(txd, 411) 
  dff = engineLoadDFF("infernus.dff", 411 ) 
  engineReplaceModel(dff, 411) 
end 
addEventHandler("onClientMapStarting",getResourceRootElement(getThisResource()), mod) 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), mod) 
  

Also check if these files exist and they're in meta.

Link to comment
Try this:
  
function mod() 
  txd = engineLoadTXD("infernus.txd") 
  engineImportTXD(txd, 411) 
  dff = engineLoadDFF("infernus.dff", 411 ) 
  engineReplaceModel(dff, 411) 
end 
addEventHandler("onClientMapStarting",getResourceRootElement(getThisResource()), mod) 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), mod) 
  

Also check if these files exist and they're in meta.

no....i want to load infernus.txd and infernus.dff from GTA directory.

Link to comment

Well, this doesnt work:

function ResetModel ( ) 
    engineRestoreModel ( 411 ) 
end 
  
addEvent ( "restoreClientModel", true ) 
addEventHandler ( "restoreClientModel", getRootElement(), ResetModel ) 
addEventHandler("onClientMapStarting",getRootElement(), ResetModel) 
  

Link to comment
Well, this doesnt work:
function ResetModel ( ) 
    engineRestoreModel ( 411 ) 
end 
  
addEvent ( "restoreClientModel", true ) 
addEventHandler ( "restoreClientModel", getRootElement(), ResetModel ) 
addEventHandler("onClientMapStarting",getRootElement(), ResetModel) 
  

umm that's weird

try this

addEventHandler("onClientMapStarting",root,function () 
engineRestoreModel( 411 ) 
end) 
setTimer(engineRestoreModel,1000,1,411) 

Link to comment
addEventHandler('onClientResourceStart', resourceRoot, 
function()  
        txd = engineLoadTXD ( "infernus.txd" ) 
        engineImportTXD ( txd, 411) 
         
        dff = engineLoadDFF ( "infernus.dff", 411) 
        engineReplaceModel ( dff, 411) 
end  
) 

Link to comment

Well this doesnt function:

function ResetModel ( ) 
    engineRestoreModel ( 411 ) 
end 
  
addEvent ( "restoreClientModel", true ) 
addEvent( "onClientMapStarting", true ) 
addEventHandler ( "restoreClientModel", getRootElement(), ResetModel ) 
addEventHandler("onClientMapStarting",getRootElement(), ResetModel) 
addEventHandler ( "onClientResourceStart", getResourceRootElement(), ResetModel ) 

Link to comment

The event: "restoreClientModel" is triggered by?

function ResetModel ( ) 
    engineRestoreModel ( 411 ) 
    outputChatBox ( "Model should be restored." ) 
end 
addEvent ( "restoreClientModel", true ) 
addEvent( "onClientMapStarting", true ) 
addEventHandler ( "restoreClientModel", getRootElement(), ResetModel ) 
addEventHandler ( "onClientMapStarting",getRootElement(), ResetModel ) 

See if it outputs that message to chat box.

Link to comment
I don't understand why do you replace it on the first place.

Im not replacing anything! Im using custom infernus(modified GTA3.img in GTA installation directory), but the wheels load after vehiclechange only. But FFS and and TFF load my wheels on map start.

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