Onplayertext
#5

As offon said, you should return 0 at the end of the callback so it will prevent the default chat from being sent. Although, this is not the only problem. SA-MP Wiki has an incorrect code and it's not corrected. Player Message start with the player's name and the color and the rest are white. The rest are the playerid and the text because the name is already given by the function itself.

I don't know what exactly you want to display to the screen but an example (with what you've shown so far) would be:
pawn Код:
new textv2[128];
format(textv2, sizeof (textv2), "(%i): %s", playerid, text);
SendPlayerMessageToAll(playerid, textv2);
Reply


Messages In This Thread
Onplayertext - by Acres - 09.01.2014, 12:49
Re: Onplayertext - by offon - 09.01.2014, 12:55
Re: Onplayertext - by Acres - 09.01.2014, 13:01
Re: Onplayertext - by Hansrutger - 09.01.2014, 13:04
Re: Onplayertext - by Konstantinos - 09.01.2014, 13:05

Forum Jump:


Users browsing this thread: 1 Guest(s)