Get the 'Firstname' from Firstname_lastname format
#3

Quote:
Originally Posted by Skylar Paul
Посмотреть сообщение
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];
}
Not sure who created it, but it sure as hell wasn't me. Oh, and i'll include the last name version of it aswell.
Thankyou heaps!
Reply


Messages In This Thread
Get the 'Firstname' from Firstname_lastname format - by Jack_Leslie - 12.07.2011, 04:06
Re: Get the 'Firstname' from Firstname_lastname format - by Skylar Paul - 12.07.2011, 04:16
Re: Get the 'Firstname' from Firstname_lastname format - by Jack_Leslie - 12.07.2011, 05:56

Forum Jump:


Users browsing this thread: 1 Guest(s)