Fireboyd78 381 Posted May 24, 2015 (edited) Here's a very simple code to help you get started on blowing up all nearby cars! Written using headscript's Lua Plugin for Scripthook. GTALua will most likely require tweaks to be made. Press F10 to explode all nearby cars (but not your own)! if get_key_pressed(Keys.F10) then -- get nearby peds local count = -1 -- no effect? local vehs = PED.GET_PED_NEARBY_VEHICLES(PLAYER.PLAYER_PED_ID(), count); --[[ print ("--- BEGIN DUMP ---") dump(vehs) print ("--- END DUMP ---") --]] if #vehs > 0 then for i = 1, #vehs do if vehs[i] ~= nil and ENTITY.DOES_ENTITY_EXIST(vehs[i]) then print ("vehs[".. tostring(i) .."] = "..tostring(ENTITY.GET_ENTITY_MODEL(vehs[i]))) if ENTITY.IS_ENTITY_A_VEHICLE(vehs[i]) then -- make sure we don't do anything to current player's vehicle if not PED.IS_PED_IN_VEHICLE(PLAYER.PLAYER_PED_ID(), vehs[i], false) then VEHICLE.EXPLODE_VEHICLE(vehs[i], true, true) else print(">> Skipping current player's vehicle") end end else print ("vehs[".. tostring(i) .."] = nil") end end endend Edited May 24, 2015 by CarLuver69 Share this post Link to post Share on other sites