ID in chat
#1

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
Reply
#2

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;
}
Reply
#3

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
Reply
#4

Why not do this:

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


Forum Jump:


Users browsing this thread: 1 Guest(s)