SA-MP Forums Archive
OnPlayerText help!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerText help!! (/showthread.php?tid=602698)



OnPlayerText help!! - Loinal - 11.03.2016

i have a problem in OnPlayerText

PHP Code:
public OnPlayerText(playeridtext[])
{
    new 
chat[200], name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
format(chatsizeof(chat), "{6B828A}(({FFFFFF}  %s(%d): {009900}%s{FFFFFF}  {6B828A}))"nameplayeridtext);
    
SendClientMessageToAll(0xFFFFFFFFchat);
    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(playeridtext[]) 

    new 
chat[200], name[MAX_PLAYER_NAME]; 
    
GetPlayerName(playeridnamesizeof(name)); 
    
format(chatsizeof(chat), "{6B828A}(({FFFFFF}  %s(%d): {009900}%s{FFFFFF}  {6B828A}))"nameplayeridtext); 
    
SendPlayerMessageToAll(0xFFFFFFFFchat); 
    return 
0




Re: OnPlayerText help!! - Sew_Sumi - 12.03.2016

Quote:
Originally Posted by MicroKyrr
View Post
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
View Post
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
View Post
Yeah now it come out black
That means you haven't used SetPlayerColor beforehand, that is if you are using the code I supplied.