Dizzle Posted August 6, 2017 Share Posted August 6, 2017 hi i need a little help from you guys what i want to do is replace a specific vehicle on shop ID since we have multiple vehicle names on the model like supra is 945 on the model jester (559) and celica gt4(1066) is on model jester (559) so the enginereplace wont work because it changed the supra to. so i have created this code but it wont work local vt = getVehicleType function getVehicleType( ... ) local ret = vt( ... ) if ret == "" then return "applymods" end return ret end function applyMods() txdcel = engineLoadTXD ( "jester.txd" ) engineImportTXD ( txdcel, 417 ) dffcel = engineLoadDFF ( "jester.dff" ) engineReplaceModel ( dffcel, 417 ) end addEventHandler("onClientResourceStart", getResourceRootElement(), applyMods) The shop ids are via mysql databases i was thinking of export mysql function to get shop id and if shopid is 1066 then replace the car with that shop id please help me -Dizzle Link to comment
NeXuS™ Posted August 6, 2017 Share Posted August 6, 2017 (edited) You can't have 2 different models on the same car. Edited August 6, 2017 by NeXuS™ Link to comment
Dizzle Posted August 6, 2017 Author Share Posted August 6, 2017 4 minutes ago, NeXuS™ said: You can't have 2 different models on the same car. its only name that discribe the model but isnt it posible if shopid is (its unique id) if shop id is that one then replace the model (if it isnt then dont replace it?) Link to comment
NeXuS™ Posted August 6, 2017 Share Posted August 6, 2017 vehicleNames = { --[SHOPID] = {[VEHID] = NEWNAME} [945] = {[559] = "Supra"}, [1066] = {[559] = "Celica GT4"} } I suppose you get the idea. Link to comment
Dizzle Posted August 6, 2017 Author Share Posted August 6, 2017 ye but then with mod replacement Link to comment
NeXuS™ Posted August 6, 2017 Share Posted August 6, 2017 As I said, you cant have 2 different models, on one 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