Rouzbeh Posted February 19, 2015 Posted February 19, 2015 hi, whats the best method for make all Empty vehicles damage proof until a player enter a vehicle and then that vehicle be damageable?
manve1 Posted February 19, 2015 Posted February 19, 2015 Set every vehicle damage proof, then use event "onVehicleEnter" to set the car damageable. Looking for tutorials or information? check out: www.simpleask.co.uk
Deepu Posted February 19, 2015 Posted February 19, 2015 exactly, else you can just you know getElementsWithinInterior(0) and undamageproof it then make it damageable when he enters the car, you can do it with variables too WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.
AMARANT Posted February 19, 2015 Posted February 19, 2015 local vehicles = getElementsByType("vehicle") for _,vehicle in pairs(vehicles) do setVehicleDamageProof(vehicle,true) end function onDamageProof(vehicle,seat,jacked) setVehicleDamageProof(vehicle,false) end addEventHandler("onPlayerVehicleEnter",root,onDamageProof)
JR10 Posted February 19, 2015 Posted February 19, 2015 When looping through the vehicles, you should make sure that they're empty. if (not isElement(getVehicleController(vehicle)) then -- The vehicle is empty, make it damage proof Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Rouzbeh Posted February 19, 2015 Author Posted February 19, 2015 yes thanks, and another question,can i make this with OnClientVehicleDamage and cancelEvent in it too? i'm making a rpg server and i want have best performance in everything so which is better?
Addlibs Posted February 20, 2015 Posted February 20, 2015 When looping through the vehicles, you should make sure that they're empty. if (not isElement(getVehicleController(vehicle)) then -- The vehicle is empty, make it damage proof Actually, assuming that this is for a deathmatch server, a player could enter a vehicle as a passenger and the vehicle would still be invincible... But whatever. Previously known as MrTasty.
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