16.10.2011, 14:07
(
Последний раз редактировалось robintjeh; 16.10.2011 в 14:18.
Причина: Found it! :D
)
Hi guys.
I have a question.
In my script, the players' name must be stripped down to only his last name.
Example: Robin_Smith>Smith
That's how it should happen. But I have no idea how.
Anyone got an idea or code? Thanks in advance.
EDIT: Nvm already found it.
I have a question.
In my script, the players' name must be stripped down to only his last name.
Example: Robin_Smith>Smith
That's how it should happen. But I have no idea how.
Anyone got an idea or code? Thanks in advance.
EDIT: Nvm already found it.
pawn Код:
stock GetPlayerFirstName(playerid)
{
new
namestring[2][MAX_PLAYER_NAME],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
split(name, namestring, '_');
return namestring[0];
}
stock GetPlayerLastName(playerid)
{
new
namestring[2][MAX_PLAYER_NAME],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
split(name, namestring, '_');
return namestring[1];
}