how to add Player near the name on the chat and player actions -
Andre02 - 12.07.2014
Hello can someone help me i wanna add the ID of the player near the name when he write in the chat and in his actions : example : Andre02(2): text
and
Andre02(2) has teleported to you
Andre02(2) has Joined the server
etc...
hope you can help me thank you
Re: how to add Player near the name on the chat and player actions -
GrandParadise - 12.07.2014
Download this script!
Click here
Re: how to add Player near the name on the chat and player actions -
Sledgehammer - 12.07.2014
Quote:
Originally Posted by GrandParadise
|
Why would he need to download a script for? At least use pastbin next time other using useless mirrors to download the file witch we do not know what it contains. His asked a simple question, although this should be in scripting help not under Server Support.
pawn Код:
new string[128], name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s (%d): %s", name, playerid, text);
It should look like Andre02(2): text if you used it correctly under the correct function. To get the users ID, use "playerid". I've shown a valid example shown above.
Re: how to add Player near the name on the chat and player actions -
Andre02 - 12.07.2014
Quote:
Originally Posted by Death1300
pawn Код:
new string[128], name[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s (%d): %s", name, playerid, text);
It should look like Andre02(2): text if you used it correctly under the correct function. To get the users ID, use "playerid". I've shown a valid example shown above.
|
i should add that pawn where under OnPlayerText ? because i copied and pasted the pawn that you added there and it didnt add the ID near the name.
Re: how to add Player near the name on the chat and player actions -
Dignity - 12.07.2014
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[144], name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s (%d): %s", name, playerid, text);
return false;
}
Re: how to add Player near the name on the chat and player actions -
Andre02 - 12.07.2014
Quote:
Originally Posted by Mionee
pawn Код:
public OnPlayerText(playerid, text[]) { new string[144], name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s (%d): %s", name, playerid, text);
return false; }
|
it doesn't let me chat.
Re: how to add Player near the name on the chat and player actions -
Dignity - 12.07.2014
https://sampwiki.blast.hk/wiki/SendPlayerMessageToAll
Re: how to add Player near the name on the chat and player actions -
Andre02 - 12.07.2014
done that link worked thank you
Re: how to add Player near the name on the chat and player actions -
GeekSiMo - 19.07.2014
Try This !!
pawn Код:
public OnPlayerText(playerid, text[])
{
new pName[MAX_PLAYERS], string[24;]
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "{%06x}%s | %d{FFFFFF}: %s", (GetPlayerColor(playerid) >>> 8), pName, playerid, text);
SendClientMessageToAll(-1, string);
SetPlayerChatBubble(playerid, text, 0xFFFFFFFF, 75.0, 5000);
return 0;
}