toptional Posted October 21, 2012 Posted October 21, 2012 Hey guys I have a script to remove some world objects here are the scripts function removeModels() removeWorldModel(985, 10, 2497, 2773, 10) removeWorldModel(986, 10, 2497, 2773, 10) removeWorldModel(7172, 100, 2577.7, 2825, 15) removeWorldModel(961, 100, 2577.7, 2825, 15) removeWorldModel(960, 100, 2577.7, 2825, 15) removeWorldModel(3474, 100, 2577.7, 2825, 15) removeWorldModel(3269, 500, 230, 2502, 15.-- s8) --> removeWorldModel(3270, 500, 230, 2502, 15.-- s8) --> removeWorldModel(3271, 500, 230, 2502, 15.-- s8) --> end addEventHandler ( "onResourceStart", getRootElement(), removeModels ) and LSbase = createColRectangle ( 2602, -2705, 208, 110) function clearBases() LSvehicles = getElementsWithinColShape(LSbase, "vehicle") for theKey,theVehicle in ipairs(LSvehicles) do health = getElementHealth(theVehicle) if health < 30 then destroyElement(theVehicle) end end end setTimer ( clearBases, 5000, 0 ) SFbase = createColRectangle ( -2497, -1831, 280, 500) function clearBases() SFvehicles = getElementsWithinColShape(SFbase, "vehicle") for theKey,theVehicle in ipairs(SFvehicles) do SFhealth = getElementHealth(theVehicle) if SFhealth < 30 then destroyElement(theVehicle) end end end setTimer ( clearBases, 5000, 0 ) LVbase = createColRectangle( 2475.3491210938, 2606.2819824219, 294.8916015625, 341.60009765625) function clearBases() LVvehicles = getElementsWithinColShape(LVbase, "vehicle") for theKey,theVehicle in ipairs(LVvehicles) do LVhealth = getElementHealth(theVehicle) if LVhealth < 30 then destroyElement(theVehicle) end end end setTimer ( clearBases, 5000, 0 ) function unBlock() setTimer ( destroyElement, 30000, 1, source ) end addEventHandler ( "onVehicleExplode", getRootElement(), unBlock ) Please Help me thanks!
BorderLine Posted October 22, 2012 Posted October 22, 2012 try this to remove world -clientside function remove () local version = getVersion() if version.mta == "1.3.1" then removeWorldModel(985, 10, 2497, 2773, 10) removeWorldModel(986, 10, 2497, 2773, 10) removeWorldModel(7172, 100, 2577.7, 2825, 15) removeWorldModel(961, 100, 2577.7, 2825, 15) removeWorldModel(960, 100, 2577.7, 2825, 15) removeWorldModel(3474, 100, 2577.7, 2825, 15) removeWorldModel(3269, 500, 230, 2502, 15.-- s8) --> removeWorldModel(3270, 500, 230, 2502, 15.-- s8) --> removeWorldModel(3271, 500, 230, 2502, 15.-- s8) --> end end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), remove)
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