I don't know how to display a player's real name (e.g., Ranger), but I do know how to display a player's group name (e.g., Alpha Black 1).
For the latter, if that'll suffice for you, you need to use the format command. E.g.:
hint format ["%1 has won the race!",_this]
Where _this is the parameter that was passed into your script.
You can also use this with the titleText command.
titleText [format [""%1 has won the race!"",_this], "PLAIN"]