We present a numerical determination of the scaling functions of the magnetization, the susceptibility, and the Binder's cumulant for two nonequilibrium model systems with varying range of interactions. We consider Monte Carlo simulations of the block voter model (BVM) on square lattices and of the majority-vote model (MVM) on random graphs. In both cases, the satisfactory data collapse obtained for several system sizes and interaction ranges supports the hypothesis that these functions are universal. Our analysis yields an accurate estimation of the long-range exponents, which govern the decay of the critical amplitudes with the range of interaction, and is consistent with the assumption that the static exponents are Ising-like for the BVM and classical for the MVM.