25.11.2012, 17:59
Try this.
The name HAS to be in Firstname_Lastname format that, or this won't work well.
pawn Код:
stock returnFirstName(playerid)
{
new name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
new pos = strfind(name, '_');
if(pos != -1) {
strdel(name, pos, strlen(name));
return name;
}
return 0;
}