SA-MP Forums Archive
ID 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: ID in chat (/showthread.php?tid=86873)



ID in chat - jakes888 - 16.07.2009

hm,i have problem with id in chat i do this:

Код:
if (realchat == 0)
	{
		new string5[128];
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string5, sizeof(string5), "%s[%i]: %s", sendername, playerid, text);
		SendClientMessageToAll(COLOR_WHITE,string5);
		return 0;
	}
everything work except color of player and when I chosing skin(Gang system) and type "done" they didn't want to spawn me
pls help

sorry for my bad english


Re: ID in chat - Khelif - 16.07.2009

mmm.. do you want text to be shown in the same color as player?

Код:
if (realchat == 0)
{
	new string5[128];
	GetPlayerName(playerid, sendername, sizeof(sendername));
	format(string5, sizeof(string5), "%s[%i]: %s", sendername, playerid, text);
	SendClientMessageToAll(GetPlayerColor(playerid),string5);
	return 0;
}



Re: ID in chat - oOChazyBoyOo - 19.09.2009

Quote:
Originally Posted by ĸнelιғaтι
mmm.. do you want text to be shown in the same color as player?

Код:
if (realchat == 0)
{
	new string5[128];
	GetPlayerName(playerid, sendername, sizeof(sendername));
	format(string5, sizeof(string5), "%s[%i]: %s", sendername, playerid, text);
	SendClientMessageToAll(GetPlayerColor(playerid),string5);
	return 0;
}
this code helped me thx


Re: ID in chat - [eLg]Timmy - 19.09.2009

Why not do this:

pawn Код:
if (realchat == 0)
{
    new string5[128];
    format(string5, sizeof(string5), "[%i] %s", playerid, text);
    SendPlayerMessageToAll(playerid,string5);
    return 0;
}