OnPlayerText help!! -
Loinal - 11.03.2016
i have a problem in OnPlayerText
PHP Code:
public OnPlayerText(playerid, text[])
{
new chat[200], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(chat, sizeof(chat), "{6B828A}(({FFFFFF} %s(%d): {009900}%s{FFFFFF} {6B828A}))", name, playerid, text);
SendClientMessageToAll(0xFFFFFFFF, chat);
return 0;
}
i think as before i saw it was send me it player black
Re: OnPlayerText help!! -
Ciarannn - 11.03.2016
Whats the problem, is the text coming out black?
Re: OnPlayerText help!! -
Loinal - 11.03.2016
i need a new OnPlayerText
Re: OnPlayerText help!! -
[XST]O_x - 11.03.2016
http://forum.sa-mp.com/forumdisplay.php?f=33
Re: OnPlayerText help!! -
Loinal - 11.03.2016
what i need there?
Re: OnPlayerText help!! -
Sew_Sumi - 11.03.2016
What in the heck are you asking? [XST]O_x is sure you don't speak English and posted up the other sections to show you to post in there if needed...
But seriously, What is the problem?
Re: OnPlayerText help!! -
MicroKyrr - 11.03.2016
The string is too big , OnplayerText should use "SendPlayerMessageToAll" Not "SendClientMessageToAll"
PHP Code:
public OnPlayerText(playerid, text[])
{
new chat[200], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(chat, sizeof(chat), "{6B828A}(({FFFFFF} %s(%d): {009900}%s{FFFFFF} {6B828A}))", name, playerid, text);
SendPlayerMessageToAll(0xFFFFFFFF, chat);
return 0;
}
Re: OnPlayerText help!! -
Sew_Sumi - 12.03.2016
Quote:
Originally Posted by MicroKyrr
The string is too big , OnplayerText should use "SendPlayerMessageToAll" Not "SendClientMessageToAll"
|
Half correct but not quite.
Quote:
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.
|
For what he's using it for, he needs SendClientMessage. He could change it to SendPlayerMessageToAll but then it won't include the ID.
Quote:
The message to show (max 144 characters).
|
Re: OnPlayerText help!! -
Loinal - 06.04.2016
Quote:
Originally Posted by Ciarannn
Whats the problem, is the text coming out black?
|
Yeah now it come out black
Re: OnPlayerText help!! -
Sew_Sumi - 06.04.2016
Quote:
Originally Posted by Loinal
Yeah now it come out black
|
That means you haven't used SetPlayerColor beforehand, that is if you are using the code I supplied.