A right $R$-module $P$ is said to be projective if for any epimorphism of right $R$-modules, say $g:B \longrightarrow C$ and any $R$-homomorphism $h:P \longrightarrow C$, there exists $h':P \longrightarrow B$ such that $h=g\circ h'$.
A right $R$-module $P$ is said to be local if $P$ has a largest submodule.
I want to prove the following assertion:
If $P$ is projective and local, then $P$ is endolocal (i.e. $\mathrm{End}_R(P)$ is local).
I don't know how should I start to proof. A few good hints would be appreciated.
Proposition: if $f:P\to P$ is an $R$ endomorphism, then $f$ is surjective iff it is an isomorphism. (Apply projectivity directly to get the inverse.)
Corollary: the nonunits of $End_R(P)$ map $P$ into the maximum submodule. Thus that set is additively closed and forms an ideal. This matches a characterization suggested in the comments.