Name with dots
#1

I want this function to return something like this:

MyName ..........

But it doesn't work, it just returns my normal name without the dots.

What's wrong:

pawn Код:
stock GetNameWithDots(playerid)
{
    new name[MAX_PLAYER_NAME];

    if(IsPlayerConnectedAndLoggedIn(playerid))
    {
        GetPlayerName(playerid, name, sizeof(name));
       
        new start = strlen(name) + 1;
       
        for(new i = start; i < MAX_PLAYER_NAME; i++)
        {
            name[i] = '.';
        }
    }
   
    return name;
}
Please help, thank you...
Reply
#2

pawn Код:
GetNameWithDots(playerid)
{
    new playersName[MAX_PLAYER_NAME + 6];
    GetPlayerName(playerid, playersName, MAX_PLAYER_NAME);
    strcat(playersName, ".....");
    return playersName;
}
Reply
#3

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)