onplayertext callback
#1

PHP код:
    new text[128];
    
format(textsizeof (text), "%s ( %d ) %s"PlayerName[playerid], playeridtext);
    
SendPlayerMessageToAll(playeridtext); 
Why it still shows me the old nickname? like "Wallen: Wallen ( 2 ) hello"
Reply
#2

Quote:
Originally Posted by wallen
Посмотреть сообщение
PHP код:
    new text[128];
    
format(textsizeof (text), "%s ( %d ) %s"PlayerName[playerid], playeridtext);
    
SendPlayerMessageToAll(playeridtext); 
Why it still shows me the old nickname? like "Wallen: Wallen ( 2 ) hello"
Have you added return 0; below?
Reply
#3

PHP код:
public OnPlayerText(playeridtext[])
{
    if(
connected[playerid] == true)
    {
        
SendClientMessage(playerid, -"{c3c3c3}(INFO) You can't talk, you need to spawn first...");
        return 
0;
    }
    
    if(
Mute[playerid] == 1
    {
        
SendClientMessage(playerid, -1"{c3c3c3}(INFO) You're muted therefore you can't type anything.");
        return 
0;
    }
    
    new 
text2[128];
    
format(text2sizeof (text), "%s ( %d ) %s"PlayerName[playerid], playeridtext2);
    
SendPlayerMessageToAll(playeridtext);
    return 
0;

yeah
Reply
#4

Quote:
Originally Posted by wallen
Посмотреть сообщение
PHP код:
public OnPlayerText(playeridtext[])
{
    if(
connected[playerid] == true)
    {
        
SendClientMessage(playerid, -"{c3c3c3}(INFO) You can't talk, you need to spawn first...");
        return 
0;
    }
    
    if(
Mute[playerid] == 1
    {
        
SendClientMessage(playerid, -1"{c3c3c3}(INFO) You're muted therefore you can't type anything.");
        return 
0;
    }
    
    new 
text2[128];
    
format(text2sizeof (text), "%s ( %d ) %s"PlayerName[playerid], playeridtext2);
    
SendPlayerMessageToAll(playeridtext);
    return 
0;

yeah
Show the SendPlayerMessageToAll callback
EDIT: moreover you can just use SendClientMessageToAll :/
Reply
#5

try this

PHP код:
    new text[128]; 
    
format(textsizeof (text),  "(%d) %s"playeridtext); 
    
SendPlayerMessageToAll(playeridtext); 
Reply
#6

just solved
Reply
#7

Quote:
Originally Posted by wallen
Посмотреть сообщение
just solved
Care to share? lol
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)