Jump to content

Restoring infernus on mapstart


Sex*

Recommended Posts

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

Edited by Guest
Posted

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.

Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS.

Developer and owner of

https://projectbea.st - Project Beast
Posted
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.

Posted

Well, this doesnt work:

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

Posted
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) 

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

Discord: its.tails

Posted

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 ) 

Posted

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

01012681484f3ca.jpg?1361009451

I put outputchatbox many times... but as you see it puts out a message but my infernus is still with those shit wheels.

Posted

These wheels are part of the infernus mod itself?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

If the wheels are part of the infernus mod, then maybe the problem is that the script is restoring the original infernus too fast.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
If the wheels are part of the infernus mod, then maybe the problem is that the script is restoring the original infernus too fast.

Ye they are a part of that mod. But how it would restore slower then?

Posted

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

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