overlocus Posted August 18, 2018 Posted August 18, 2018 hi guys . i want Vehicles cant be pushed by on foot. can you help me
Moderators IIYAMA Posted August 18, 2018 Moderators Posted August 18, 2018 I don't think that is possible by default. do local vehicles = getElementsByType("vehicle") for i=1, #vehicles do local vehicle = vehicles[i] setElementFrozen(vehicle, true) end end You can freeze the vehicles, but that also means you can't drive them any more. https://wiki.multitheftauto.com/wiki/SetElementFrozen Or you could make the vehicles more heavy, with: (recommend this one) https://wiki.multitheftauto.com/wiki/SetModelHandling Or you can remove the collision between the players and the vehicles: https://wiki.multitheftauto.com/wiki/SetElementCollidableWith Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
JeViCo Posted August 18, 2018 Posted August 18, 2018 try this addEventHandler("onClientElementStreamIn", getRootElement(), function() if getElementType(source) == "vehicle" then #getVehicleOccupants(source) == 0 then setElementFrozen(source,true) end end end) addEventHandler("onClientVehicleEnter", getRootElement(),function() if #getVehicleOccupants(source) == 1 then -- not sure right here (check if car empty) setElementFrozen(source,false) end end) @overlocus 1
JustinMTA Posted August 18, 2018 Posted August 18, 2018 (edited) You can find default .COL files on the net for all GTA vehicles, if I were you, I'd try loading the .COL to a trashcan object or something, then attach the trashcan to the car using attachElement, then make the trashcan invisible using .TXD or shaders, not sure if .COL created for vehicles will load to regular objects though.. If it crashes MTA you must create your own .COL file using 3DS Max or there's other programs that can create .COL as well, but harder to use in my opinion. The code above will probably work also Edited August 18, 2018 by JustinMTA I can do 3D vehicle/object mods and basic scripts from scratch, contact me for free help!! Skype/Discord/Telegram: [email protected] / Justin|X5|#0977 / @JustinX5 Xtreme 5 Gaming - COMING SOON! I'd love it if more people in MTA utilized these amazing features, so please ask me anything related to 3D modeling/basic scripting/etc. The expert knows more and more about less and less until they know everything about nothing.
MisterQuestions Posted August 27, 2018 Posted August 27, 2018 Freezing on exit should be enough to satisfact what you're asking for. Unfreeze only when entering and there's a player on driver's seat "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
Dzsozi (h03) Posted September 4, 2018 Posted September 4, 2018 I suggest you using https://wiki.multitheftauto.com/wiki/OnClientVehicleCollision Your signature image is too large. Removed
Simple0x47 Posted September 4, 2018 Posted September 4, 2018 On 18/08/2018 at 18:53, JustinMTA said: You can find default .COL files on the net for all GTA vehicles, if I were you, I'd try loading the .COL to a trashcan object or something, then attach the trashcan to the car using attachElement, then make the trashcan invisible using .TXD or shaders, not sure if .COL created for vehicles will load to regular objects though.. If it crashes MTA you must create your own .COL file using 3DS Max or there's other programs that can create .COL as well, but harder to use in my opinion. The code above will probably work also No sense, but nvm. 2 "Keep making it simplex."
JustinMTA Posted September 5, 2018 Posted September 5, 2018 4 hours ago, Simple01 said: No sense, but nvm. Or maybe you don't have an imagination xD 1 I can do 3D vehicle/object mods and basic scripts from scratch, contact me for free help!! Skype/Discord/Telegram: [email protected] / Justin|X5|#0977 / @JustinX5 Xtreme 5 Gaming - COMING SOON! I'd love it if more people in MTA utilized these amazing features, so please ask me anything related to 3D modeling/basic scripting/etc. The expert knows more and more about less and less until they know everything about nothing.
Simple0x47 Posted September 5, 2018 Posted September 5, 2018 8 hours ago, JustinMTA said: Or maybe you don't have an imagination xD I've got imagination but that thing wouldn't work out. "Keep making it simplex."
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