Surname of nick
#5

pawn Код:
GetPlayerNameEx(playerid)
{
    new Nick[MAX_PLAYER_NAME + 1], pos;
    GetPlayerName(playerid,Nick,sizeof(Nick));
    if((pos = strfind(Nick,"_",true)) != -1)
        Nick[pos] = EOS;

    return Nick;
}

SetPlayerNameEx(playerid, const name[])
{
    new Nick[MAX_PLAYER_NAME + 1], pos;
    GetPlayerName(playerid,Nick,sizeof(Nick));
    if((pos = strfind(Nick,"_",true)) != -1)
    {
        strdel(Nick,0,pos);
        strins(Nick, name, 0);
        SetPlayerName(playerid, Nick);
    }
}
Reply


Messages In This Thread
Surname of nick - by AlmirDelic - 26.11.2015, 15:39
Re: Surname of nick - by Jefff - 26.11.2015, 15:52
Re: Surname of nick - by AlmirDelic - 26.11.2015, 16:11
Re: Surname of nick - by AlmirDelic - 26.11.2015, 16:20
Re: Surname of nick - by Jefff - 26.11.2015, 16:26
Re: Surname of nick - by AlmirDelic - 26.11.2015, 16:30

Forum Jump:


Users browsing this thread: 1 Guest(s)