OnPlayerText help!!
#1

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
Reply
#2

Whats the problem, is the text coming out black?
Reply
#3

i need a new OnPlayerText
Reply
#4

http://forum.sa-mp.com/forumdisplay.php?f=33
Reply
#5

what i need there?
Reply
#6

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?
Reply
#7

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

Reply
#8

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).

Reply
#9

Quote:
Originally Posted by Ciarannn
View Post
Whats the problem, is the text coming out black?
Yeah now it come out black
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)