ID after name - 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: ID after name (
/showthread.php?tid=429636)
ID after name -
RiChArD_A - 10.04.2013
Hi, what do I put on OnPlayerText to show the player's id after their name when they talk? Thanks.
Re: ID after name -
Om3n - 10.04.2013
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[256];
format(string,256,"%s [%d]:{FFFFFF} %s",name(playerid), playerid,text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
Re: ID after name -
Scyattica - 10.04.2013
Код:
public OnPlayerText(playerid, text[])
{
new message[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(message, sizeof(message), "%s(%i) says: %s", name, playerid, text);
SendClientMessageToAll(-1, message);
return 0;
}
Re: ID after name -
RiChArD_A - 10.04.2013
Quote:
Originally Posted by Om3n
pawn Код:
public OnPlayerText(playerid, text[]) { new string[256]; format(string,256,"%s [%d]:{FFFFFF} %s",name(playerid), playerid,text); SendClientMessageToAll(GetPlayerColor(playerid),string); return 0; }
|
Thank you very much.