Hey. I solved your problem.
Change:
PHP код:
public OnPlayerText(playerid, text[])
{
new PlayerName[24];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(strcmp(PlayerName,"Martex",true))
{
new xText[144];
format(xText, sizeof (xText), "Martex {FF0000}(Owner):{00FFE6} %s",text);
SendPlayerMessageToAll(playerid, xText);
}
else
{
new pText[144];
format(pText, sizeof (pText), "(%d) %s", playerid, text);
SendPlayerMessageToAll(playerid, pText);
}
return 0;
}
by :
PHP код:
public OnPlayerText(playerid, text[])
{
new PlayerName[24];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(!strcmp(PlayerName,"Martex",true)) // You forgot "!"
{
new xText[144];
format(xText, sizeof (xText), "%s {FF0000}(Owner):{00FFE6} %s",PlayerName, text); // You can delete the first %s.
SendClientMessageToAll(-1, xText); // SendClientMessageToAll is better for this way
return 0;
}
else
{
new pText[144];
format(pText, sizeof (pText), "(%d) %s", playerid, text);
SendClientMessageToAll(-1, pText);
return 0; // By the way, you can put both return 0 at the end of the function.
}
}
So I will give you some explications. Firstly, you are using "SendPlayerMessageToAll" (I didn't know this). I did some research and I found this:
« Description:
Sends a message in the name of a player to all other players on the server.
The line will start with the sender's name in their color, followed by the message in white. »
That's why that wasn't working. Use SendClientMessagePlayerToAll should be easier.
Secondly; I put a "!" before strcmp because without "!", this mean: There is a difference between those 2 strings.
I know my English is bad, but I tried to explain you, your mistakes.
I hope I helped you and if you have any questions about the code, post it here.