hazard Posted April 12, 2014 Share Posted April 12, 2014 Hey, Is there any way to make a script which automatically changes car handlings to default GTA ones when a player enters the server? Similar to anti-carmod, like this: function replaceModel() txd = engineLoadTXD("cheetah.txd", 425 ) engineImportTXD(dff, 425) dff = engineLoadDFF("cheetah.dff", 425 ) engineReplaceModel(dff, 425) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) I tried this script, but i couldn't get it to work in my server: vehicleIDS = { 415 } function changeHandling ( ) for _, model in ipairs ( vehicleIDS ) do setVehicleHandling(veh, "mass", 3400.0) setVehicleHandling(veh, "turnMass", 5700.0) setVehicleHandling(veh, "dragCoeff", 0.0) setVehicleHandling(veh, "centerOfMass", { 0.0, 0.0, -0.2 } ) end end addEventHandler ( "onResourceStart", resourceRoot, changeHandling ) Link to comment
Bonsai Posted April 12, 2014 Share Posted April 12, 2014 Hey, Is there any way to make a script which automatically changes car handlings to default GTA ones when a player enters the server?Similar to anti-carmod, like this: function replaceModel() txd = engineLoadTXD("cheetah.txd", 425 ) engineImportTXD(dff, 425) dff = engineLoadDFF("cheetah.dff", 425 ) engineReplaceModel(dff, 425) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) I tried this script, but i couldn't get it to work in my server: vehicleIDS = { 415 } function changeHandling ( ) for _, model in ipairs ( vehicleIDS ) do setVehicleHandling(veh, "mass", 3400.0) setVehicleHandling(veh, "turnMass", 5700.0) setVehicleHandling(veh, "dragCoeff", 0.0) setVehicleHandling(veh, "centerOfMass", { 0.0, 0.0, -0.2 } ) end end addEventHandler ( "onResourceStart", resourceRoot, changeHandling ) According to the wiki all you need is: setVehicleHandling ( element theVehicle, true ) -- Reset all properties to GTA default value Try to use Event OnPlayerVehicleEnter for that. Link to comment
monumento Posted April 13, 2014 Share Posted April 13, 2014 It's possible. But if you want to make to make it for DD server you need to put it somewhere else, not in onpalyerentercar because player is teleported to car. 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