SA-MP Forums Archive
How to change nicks in chat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to change nicks in chat (/showthread.php?tid=90449)



How to change nicks in chat - Ben147 - 08.08.2009

in my server if some text something hes name saw like this Name_Lastname
how can i do when someone text its was saw like this Name Lastname
without this: _


Re: How to change nicks in chat - dice7 - 08.08.2009

pawn Код:
public OnPlayerText(playerid, text[])
{
    new pname[MAX_PLAYER_NAME], string[MAX_PLAYER_NAME];
    GetPlayerName(playerid,string,sizeof(string));
    GetPlayerName(playerid,pname,sizeof(pname));
    for(new a = 0; a < strlen(string); a++)
    {
      if(string[a] == '_') string[a] = ' ';
    }
    SetPlayerName(playerid,string);
    SendPlayerMessageToAll(playerid,text);
    SetPlayerName(playerid,pname);
    return 0;
}
Untested, but it should work


Re: How to change nicks in chat - Ben147 - 08.08.2009

i did something else but Thanks.
Solved.