public OnPlayerText(playerid, text[])
{
new textv2[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), "%s (%s) (%d)", text, name, playerid);
SendPlayerMessageToAll(playerid, textv2);
return 0;
}
pawn Код:
|
new old_name [24], new_txt [128]; GetPlayerName (playerid, old_name, 24); format (new_txt, 128, "[TEXT]_%s", old_name); SetPlayerName (playerid, new_txt); format (new_txt, 128, "(%d) %s", playerid, text); SendPlayerMessageToAll (playerid, new_txt); SetPlayerName (playerid, old_name); return 0;
new name [24], txt [128]; format (txt, 128, "[TEXT] { USE EMBED COLORS TO SET PLAYER COLOR }%s{FFFFFF} (%d): %s", name, playerid, text); SendClientMessageToAll(-1, txt); return 0;
public OnPlayerText(playerid, text[])
{
new message[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(message, sizeof (message), "[Text here] %s (%d):{FFFFFF} %s",name, playerid, text);
SendClientMessageToAll([Color here], message);
return 0;
}
// On top of your script
new PlayerTag[MAX_PLAYERS][24];
// Player uses this command to set his tag.
CMD:settag(playerid, params[])
{
new string[64], tag[24];
if(sscanf(params, "s[24]", tag)) return SendClientMessage(playerid, -1, "Usage: /settag [text]");
format(PlayerTag[playerid], 24, tag);
format(string, sizeof(string), "You have changed your tag to %s.", tag);
SendClientMessage(playerid, -1, string);
return 1;
}
public OnPlayerText(playerid, text[])
{
new playername[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "[%s] %s: %s", PlayerTag[playerid], playername, text);
SendClientMessageToAll(-1, string);
return 0;
}