Remote the _ From a roleplay name and send the firstname to chat only!
#5

Try this.
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;
}
The name HAS to be in Firstname_Lastname format that, or this won't work well.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)