#1

how to create a When a player uses /me /b or talk to show Name Name, not to show Name_Name ?
Reply
#2

Hope this helps.

pawn Код:
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;
}
Edit:

Add this under your #include's

Preferably at the bottom of the script

When you want to format a name to a string, do it like this.

pawn Код:
command(b, playerid, params[])
{
    new message[128], string[256];
    if(sscanf(params, "s[128]", message)) return SendClientMessage(playerid, 0xFFFFFFF, "Server: /b [message]");
    {
        format(string, sizeof(string), "(( %s says: %s ))", RemoveUnderScore(playerid), message);
        SendClientMessage(playerid, COLOR, string);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)