17.11.2013, 15:41
Hi, i am editing PPC Trucking. When players are chatting, the player id isn't displaying with their name on chat box, how can i make the id shows up in this gamemode? Can anyone please help me?
public OnPlayerText(playerid, text[])
{
new string[256], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof PlayerName);
format(string, sizeof string, "%s(%i): {FFFFFF}%s", PlayerName, playerid, text);
return SendClientMessageToAll(GetPlayerColor(playerid), string);
}
You have to make sure that at the end of OnPlayerText, it says return 0; and not return 1;. Returning 0 prevents the default built-in message from being sent.
If it still gets sent, then an include or a plugin you're using may be the cause of this problem. |