Jump to content

Strange bug with Object Replacing


SSC_Guy

Recommended Posts

Hi all, i think every guy, that try Object replacing thing saw that strange thing - sometimes (on replacing), MTA messed up with Textures or Col file. In fact, you saw not textured DFF file, with\without collision. But when you /restart your script - this issue is not appear again.

Same thing with reconnecting to server - if you saw that bug, you just reconnect, and everything (txd and col files) loaded succesfully.

May this bug can be solved with additional Lua scripting, or this is MTA issue?

Link to comment

Because MTA's model replacing is not 100% perfect, it will fail from time to time, resulting in for instance white objects, collisionless objects or even in rare cases crashes. In these cases (except for the crashes) I recommend making a command (like /replace) to re-load the custom models again. This way, if people experience problems with the custom models, they can type the command and hope it'll be better if they try again, for as long as it takes to have the custom model working completely.

You can do something like this:

function replaceObjects()
-- Replace objects code here
end
addCommandHandler("replace",replaceObjects)
 
function resourceStart()
setTimer(replaceObjects,1000,3) -- Reload the custom models several times, slightly increases the chance it works without having to type a command
end
addEventHandler("onClientResourceStart",getResourceRootElement(),resourceStart)

Link to comment
  • 2 weeks later...

Alright , seweral-time replacing doesnt work, i mean what - in first replace he missed textures, then, in other one, he load everything right. But in 3 replace he miss textures again... So this replace attemps kinda random, and this is not neccesery to put few of them.

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