The classical Siciak-Zakharyuta theorem states that the Siciak-Zakharyuta function \(V_{E}\) of a subset E of \({\mathbb {C}}^n\) , also called a pluricomplex Green function or global extremal function of E, equals the logarithm of the Siciak function \(\Phi _E\) if E is compact. The Siciak-Zakharyuta function is defined as the upper envelope of functions in the Lelong class that are negative on E, and the Siciak function is the upper envelope of m-th roots of the modulus of polynomials p in \(\mathcal {P}_m({\mathbb {C}}^n)\) of degree \(\le m\) such that \(|p|\le 1\) on E. We generalize the Siciak-Zakharyuta theorem to the case where the polynomial space \(\mathcal {P}_m({\mathbb {C}}^n)\) is replaced by \(\mathcal {P}_m^S({\mathbb {C}}^n)\) consisting of all polynomials with exponents restricted to sets mS, where S is a compact convex subset of \({\mathbb {R}}^n_+\) with \(0\in S\) . It states that if q is an admissible weight on a closed set E in \({\mathbb {C}}^n\) then \(V^S_{E,q}=\log \Phi ^S_{E,q}\) on \({\mathbb {C}}^{*n}\) if and only if the rational points in S form a dense subset of S.