opnaiC Posted May 5, 2016 Posted May 5, 2016 Hello, below you can see 2 simple functions. How I can set them up that they will only work for the vehicle IDs on the top? Starting with scripting... dont have a big knowledge... local Vehicles = { [601]=true,[427]=true,[551]=true,[596]=true,[523]=true,[582]=true,[488]=true,[525]=true,[420]=true } function respawnExplodedVehicle() setTimer(respawnVehicle, 5000, 1, source) end addEventHandler("onVehicleExplode", root, respawnExplodedVehicle) function respawnVehicleOnExit() setTimer(respawnVehicle, 10000, 1, source) end addEventHandler("onVehicleExit", root, respawnVehicleOnExit)
opnaiC Posted May 5, 2016 Author Posted May 5, 2016 Can anyone help ? Tried some scripts that I made myself but they didnt worked too...
Saml1er Posted May 5, 2016 Posted May 5, 2016 Add this check to both functions: if Vehicles[getElementModel(source)] then -- timer here end
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