function removeAllOccupantsInVehicle(vehicle)
if isElement(vehicle) and getElementType(vehicle) == "vehicle" then
for k,v in pairs(getVehicleOccupants(vehicle)) do
if isElement(v) then
return removePedFromVehicle(v)
end
end
end
return false
end
addEvent("SS", true)
addEventHandler("SS", root, function( )
local vehicle = getPedOccupiedVehicle(source)
if vehicle then
removeAllOccupantsInVehicle(vehicle)
end
end)