Player isn't defined...
testMarker = createMarker(-1456.7243652344, 532.509765625, 18.010332107544, "cylinder", 7, 100, 100, 100)
function attach(player)
vehicle = getPedOccupiedVehicle ( player )
attachElements ( vehicle, testMarker, 0, 0, 5 )
end
addCommandHandler("attach",attach)