therenex Posted January 6, 2008 Share Posted January 6, 2008 hi guys 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 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
ChrML Posted January 6, 2008 Share Posted January 6, 2008 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now