I have to prove that if $P$ is a $R$-module , $P$ is projective $\Leftrightarrow$ there is a family $\{x_i\}$ in $P$ and morphisms $f_i\colon P\to R$ such that for all $x\in P$ $$ x= \sum_{i\in I} f_i(x)x_i$$ where for each $x\in P$, $f_i(x)=0$ for almost all $i\in I$.
Any help?
Put the $f_i$ together to form one giant $f$ from $P$ to $R^{(I)}$, the direct sum of $I$ copies of the ring $R$. The condition that $x = \sum f_i(x) x_i$ just means that there is some $g:R^{(I)}\to P$ such that $g(f(x)) = x$, namely $g((r_1,r_2,...)) = r_1x_1 + r_2x_2 +\cdots$. In other words, $P$ is a direct summand of the free module $R^{(I)}$.