Differentiating between players

how would i do this in the code? or do i need a code for it?