~Air Posted November 28, 2014 Share Posted November 28, 2014 Hey dudes, is it able to disable carmods? Link to comment
ViRuZGamiing Posted November 28, 2014 Share Posted November 28, 2014 Not that I know of, you could ofcourse use all the basic textures and load them as a script but I could create some lagg. Link to comment
~Air Posted November 28, 2014 Author Share Posted November 28, 2014 I think it isn't a good idea Link to comment
Enargy, Posted November 28, 2014 Share Posted November 28, 2014 check it out https://wiki.multitheftauto.com/wiki/EngineRestoreModel Link to comment
~Air Posted November 28, 2014 Author Share Posted November 28, 2014 I want to do it for all vehicles, it would be hard work, isn't there any option in anti-cheat or sth.? Link to comment
Enargy, Posted November 28, 2014 Share Posted November 28, 2014 try this (i have not tried) addEventHandler("onClientResourceStart", resourceRoot, function() for i, v in ipairs(getElementsByType("vehicle")) do local vehicleID = getVehicleIDFromName ( v ) engineRestoreModel ( vehicleID ) end end Link to comment
Feche1320 Posted November 29, 2014 Share Posted November 29, 2014 I don't think it is possible since the player's GTA3.img (this is where textures and DFFs are loaded from) does not contain the original .dff file. The first solution and not recommended is to force the player to download all stock vehicles .dff files and re-set them using MTA DFFs functions (engineLoadDFF, engineImportDFF) Of course it's a hard work and waste of bandwidth since players with stock DFFs will have to download them aswell, but I know that MTA has a function to check if a certain player has vehicle mods or not (can't remember the function name right now), so maybe you can skip players with already original .dff files. The second solution would be using the function to check if the player has mods or not, kick the player if they have and tell them to use only stock .dff files, but again, this could lead to players leaving your server since a single player won't uninstall all his mods only to play on one server (unless they are some kind of constant playing player on the server) Link to comment
Dealman Posted November 29, 2014 Share Posted November 29, 2014 This is included in the mtaserver.conf file as far as I'm aware. <!-- By default, the server will block the use of customized GTA:SA data files. --> <!-- To allow specific client files, add one or more of the following: --> <!-- client_file name="data/carmods.dat" verify="0" --> <!-- Comma separated list of disabled anti-cheats. For details see [url=https://wiki.multitheftauto.com/wiki/Anti-cheat_guide]https://wiki.multitheftauto.com/wiki/Anti-cheat_guide[/url] e.g. To disable anti-cheat #2 and #3, use: 2,3 --> <disableac></disableac> Link to comment
~Air Posted November 29, 2014 Author Share Posted November 29, 2014 I tried this: addEventHandler("onClientResourceStart", resourceRoot, function() for i, v in ipairs(getElementsByType("vehicle")) do local vehicleID = getVehicleModelFromName ( vehicle ) engineRestoreModel ( v ) end end) But there is an error called: Bad argument @getVehicleModelFromName [Expected string at argument 1, got nil] Link to comment
John Smith Posted November 29, 2014 Share Posted November 29, 2014 addEventHandler("onClientResourceStart", resourceRoot, function() for i, v in ipairs(getElementsByType("vehicle")) do local vehicleID = getVehicleModelFromName ( v ) engineRestoreModel ( vehicleID ) end end) Link to comment
~Air Posted November 29, 2014 Author Share Posted November 29, 2014 Now I get an another error: Bad argument @getVehicleModelFromName [Expected string at argument 1, got vehicle] Link to comment
John Smith Posted November 29, 2014 Share Posted November 29, 2014 addEventHandler("onClientResourceStart", resourceRoot, function() for i, v in ipairs(getElementsByType("vehicle")) do local vehicleID = getElementModel ( v ) engineRestoreModel ( vehicleID ) end end) Link to comment
Dealman Posted November 29, 2014 Share Posted November 29, 2014 That's because getElementsByType, gets the elements by their type and stores it in a table. You're getting elements with the element type "vehicle". So what you will get is a vehicle element. Use getElementModel instead. Edit: John beat me to it. However, I doubt this will make any difference. I'm pretty sure engineRestoreModel restores to whatever model is inside the GTA3.img. So even if they did modify a vehicle, it would just restore it to the one they modified anyway. engineRestoreModel won't magically repair the GTA3.img to original. 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