How to remove the "_" from the names?
#7

I'm pretty sure you do something wrong, it works pretty fine for me.
pawn Код:
public OnPlayerConnect(playerid)
{
    new string[126];
    format(string,sizeof(string),"Welcome %s",RemoveUnderScore(playerid));
    SendClientMessage(playerid,-1,string);
    return 1;
}
stock RemoveUnderScore(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(name[i] == '_') name[i] = ' ';
    }
    return name;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)