SA-MP Forums Archive
Simple help. - 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: Simple help. (/showthread.php?tid=163360)



Simple help. - DyDy - 27.07.2010

Hello, can anyone tell me how to do when players type message on chat server would send this message:

nick: (playerid) text

Thanks


Re: Simple help. - ettans - 27.07.2010

pawn Код:
public OnPlayerText(playerid,text[])
{
    new string[128],
        name[24];
   
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"%s: (%d) %s",name,playerid, text);
    SendClientMessageToAll(COLOR_WHITE,string);
    return 0;
}