Borz Posted November 11, 2014 Share Posted November 11, 2014 hey guys i have bug in custom vehicles all custom vehicles are white like in the picif somebody know how to fix this problem tell me pleas Quote Link to comment
AfuSensi Posted November 11, 2014 Share Posted November 11, 2014 The textures arent loading.Show me your script. Quote Link to comment
Borz Posted November 11, 2014 Author Share Posted November 11, 2014 addEventHandler('onClientResourceStart', resourceRoot, function() txd = engineLoadTXD ( "copcarvg.txd" ) engineImportTXD ( txd, 402 ) dff = engineLoadDFF ( "copcarvg.dff", 411 ) engineReplaceModel ( dff, 598 ) end ) Quote Link to comment
Guest AleksCore Posted November 11, 2014 Share Posted November 11, 2014 (edited) 402 and 598 and 411.. It is vehicle IDs. It must be or 402 or 598 or 411 everywhere. If you want to replace infernus (411 id):local vehicleID = 411addEventHandler('onClientResourceStart', resourceRoot,function()txd = engineLoadTXD ( "copcarvg.txd" )engineImportTXD ( txd, vehicleID ) dff = engineLoadDFF ( "copcarvg.dff", vehicleID ) engineReplaceModel ( dff, vehicleID )end) Edited November 11, 2014 by AleksCore Quote Link to comment
Borz Posted November 11, 2014 Author Share Posted November 11, 2014 one last thinghow i remove ghost mode from vehicles (can hit them) Quote Link to comment
Guest AleksCore Posted November 11, 2014 Share Posted November 11, 2014 (edited) Try this. I've just made this script. It must works, thought.addEventHandler('onClientResourceStart', resourceRoot,function()local vehicles = getElementsByType("vehicle") for key, vehicle in ipairs(vehicles) do if getElementType( getVehicleOccupant(vehicle) ) == "player" then else setElementCollisionsEnabled(vehicle, true) end endend) Edited November 11, 2014 by AleksCore Quote Link to comment
Borz Posted November 11, 2014 Author Share Posted November 11, 2014 Try this. I've just made this script. It must works, thought.addEventHandler('onClientResourceStart', resourceRoot,function()local vehicles = getElementsByType("vehicle") for key, vehicle in ipairs(vehicles) do if getElementType( getVehicleOccupant(vehicle) ) == "player" then else setElementCollisionsEnabled(vehicle, true) end endend)didnt work Quote Link to comment
Guest AleksCore Posted November 11, 2014 Share Posted November 11, 2014 (edited) I know right. Wait. Let me fix it. For some reason setElementCollisionsEnabled don't work for vehicles created by map editor. Edited November 11, 2014 by AleksCore Quote Link to comment
Borz Posted November 11, 2014 Author Share Posted November 11, 2014 (edited) i see some maps that vehicles can hit in them Edited November 11, 2014 by Borz Quote Link to comment
Guest AleksCore Posted November 11, 2014 Share Posted November 11, 2014 (edited) You must to create vehicles using script, not map editor. I don't want to explain how to do it right now. In few words:addEventHandler('onClientResourceStart', resourceRoot,function()cop = createVehicle(vehID, x, y, z, rx, ry, rz)setElementCollisionsEnabled(cop, true)end) Edited November 11, 2014 by AleksCore Quote Link to comment
Borz Posted November 11, 2014 Author Share Posted November 11, 2014 (edited) ok thanks for your helpbtw i didnt understand anything of this script Edited November 11, 2014 by Borz Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.