SA-MP Forums Archive
Help me please - 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)
+--- Thread: Help me please (/showthread.php?tid=475927)



Help me please - PrinceOfPersia - 15.11.2013

Guys i want any scripter to help me

When some one talk in the main chat i want it to show the talking player ID

Thanks.


Re: Help me please - ReD_DeVi - 15.11.2013

its very easy


Re: Help me please - Giroud12 - 15.11.2013

Maybe it was shown in the game


Re: Help me please - tyler12 - 15.11.2013

pawn Код:
public OnPlayerText(playerid,text[])
{
    new string[124],name[24]; // create some variables to be used
    GetPlayerName(playerid,name,sizeof(name)); // get the players name
    format(string,sizeof(string),"%s (%d): %s",name,playerid,text); // format a string containing the name, id and the text of the message being sent
    SendClientMessageToAll(-1,string); // Change -1 to a color, -1 = white
    return 0; // return false so the default samp message isn't sent
}