13.07.2011, 00:42
Boom, Roasted.
Note that only handles up to two parts, so you could not retrieve a name such as Eryn_Martin_Miller
pawn Код:
stock GetPartOfName(playerid, part)
{
new
namepart[2][MAX_PLAYER_NAME],
PlayerName[MAX_PLAYER_NAME];
if (part > 2 || part < 1) return null; // supposing null is a null string.
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
split(PlayerName, namepart, '_');
return namepart[part - 1];
}