Jump to content

help with vehicle mods


therenex

Recommended Posts

hi guys :D

i have a little question... where i should put my installSabre function? (it installs a vehicle mod called "super sabre")

function installSabre() 
    txd = engineLoadTXD ( "sabre.txd" ) 
    engineImportTXD ( txd, 475 ) 
    dff = engineLoadDFF ( "sabre.dff", 475 ) 
    engineReplaceModel ( dff, 475 ) 
end 

i mean, in what event ?

thanks :D

i have it on the onClientPlayerSpawn function, but it installs the sabre everytime someone joins or spawn...

if someone joins after the installSabre function is executed, he will see the sabre? or this function needs to be called everytime any player should see the new car?

when im on the sabre, and someone joins, mta expulses me from the car D:

Link to comment

I'd run it on the clientside onClientResourceStart. Attach it to getResourceRootElement(getThisResource()). Like:

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

This will make it run when the player joins and is done downloading the sabre files and when the resource is started and you're done downloading. It should only require installing once, but MTA has some problems with the custom vehicle models atm so it might be a bit buggy. Will be fixed in a later preview version.

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