25.11.2012, 18:09
Sorry about that.
Tested and works in-game.
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;
}
else {
name = "NULL";
}
return name;
}