SA-MP Forums Archive
onplayertext callback - 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 callback (/showthread.php?tid=650458)



onplayertext callback - wallen - 28.02.2018

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"


Re: onplayertext callback - jasperschellekens - 28.02.2018

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?


Re: onplayertext callback - wallen - 28.02.2018

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


Re: onplayertext callback - RogueDrifter - 28.02.2018

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 :/


Re: onplayertext callback - PepsiCola23 - 28.02.2018

try this

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



Re: onplayertext callback - wallen - 28.02.2018

just solved


Re: onplayertext callback - RogueDrifter - 28.02.2018

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