get the vehicles then set the data in your script the the code down is client side , I did not try server side it has different values for third argment .
https://wiki.multitheftauto.com/wiki/SetElementData
--client side
--to enable
setElementData (vehicle, 'race.collideothers', 1 ,true)
--to disabled
-- setElementData (vehicle, 'race.collideothers', 0 ,true)