CodX Posted July 11, 2017 Share Posted July 11, 2017 Hello ! The train has some bugs in GTA multiplayer (MTA Server). When a player climb up like passager in train, he will die after tunnel of Los Santos and another location. Can be solve this bug ? P.S: Sorry if my english is bad, i from Romanian. Link to comment
Discord Moderators Pirulax Posted July 11, 2017 Discord Moderators Share Posted July 11, 2017 (edited) *Can i solve this bug * im from Romania. No, you cant solve this.. this is a sync bug, MTA is good at syincing, but not when syncing towned vehicles, trains, and anything thats attached. Or maybe you can, if you disable player damage, or attach yourself to the train(i dont think that this will work..) Edited July 11, 2017 by Pirulax Link to comment
CodX Posted July 11, 2017 Author Share Posted July 11, 2017 My server is Hard RolePlay. I can't disable damage.. Then the Cops can;t shot in criminals to kill them, or criminals in cops. Attached i've triet but don't work. Link to comment
Gordon_G Posted July 11, 2017 Share Posted July 11, 2017 (edited) you could just disable player damages when he enters inside the train, and enable them when he gets out Edited July 11, 2017 by Gordon_G Link to comment
CodX Posted July 11, 2017 Author Share Posted July 11, 2017 (edited) I've made a job for "train". If that bug can be disabled from scripting of the job, i really don't know how can i do that. Can you help me, if you how ? Edited July 11, 2017 by CodX Link to comment
Gordon_G Posted July 11, 2017 Share Posted July 11, 2017 (edited) You could try this : addEventHandler("onClientVehicleEnter", root, function (thePlayer) if thePlayer == localPlayer then local model = getElementModel(source) if model == 538 or model == 570 or model == 537 then addEventHandler("onClientPlayerDamage", localPlayer, function() cancelEvent() end ) end end end ) addEventHandler("onClientVehicleExit", root, function (thePlayer) if thePlayer == localPlayer then local model = getElementModel(source) if model == 538 or model == 570 or model == 537 then removeEventHandler("onClientPlayerDamage", localPlayer, function() cancelEvent() end ) end end end ) It should work Edited July 11, 2017 by Gordon_G Link to comment
CodX Posted July 11, 2017 Author Share Posted July 11, 2017 (edited) Ok. I will try. I will edit this message at 20:00. Now the hosting is in manage... Edited July 11, 2017 by CodX Link to comment
Gordon_G Posted July 11, 2017 Share Posted July 11, 2017 No prob. Use /debugscript 3 when u will test the script. Link to comment
CodX Posted July 11, 2017 Author Share Posted July 11, 2017 (edited) Doesn't not work. The script doesn't have errors but players take damage when they climb up in train. I will try to find o solution for that.. But I have a more serious problem on the train, that with the injury I will solve it somehow. After 5-10 minutes, the train moves its location a few meters further and no longer climbs up into it, unless it just wipes out and makes another. Edited July 11, 2017 by CodX Link to comment
Administrators Lpsd Posted July 11, 2017 Administrators Share Posted July 11, 2017 Does removing event handlers work like that? (when using anonymous functions) I'd much rather store it in a variable, or create a named function for that. Link to comment
Gordon_G Posted July 11, 2017 Share Posted July 11, 2017 @LopSided_ yes, I've never tested like this me too. But it's not his problem as I see. @CodX have you added it client side ? Link to comment
CodX Posted July 11, 2017 Author Share Posted July 11, 2017 Yes. <meta> <script src="bug.lua" type="server" /> <script src="bug.lua" type="client" /> </meta> 1 Link to comment
kieran Posted July 11, 2017 Share Posted July 11, 2017 39 minutes ago, CodX said: Yes. <meta> <script src="bug.lua" type="server" /> <script src="bug.lua" type="client" /> </meta> I am a very bad scripter.... But you have 2 of the same file, one is server, and one client. Try replacing the meta with this. <meta> <script src="bug.lua" type="client" /> </meta> Link to comment
CodX Posted July 12, 2017 Author Share Posted July 12, 2017 Ok. I will edit this message with a reponse in 1 hour, i wait to connect a player P.S: Sorry for my english. Link to comment
CodX Posted July 14, 2017 Author Share Posted July 14, 2017 Work when a player type /glue ! Is very good and in this mode ! Thank you for help ! 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