OnPlayerText mute.
#5

Quote:
Originally Posted by ivndosos
Посмотреть сообщение
Fixed, had to change return 1; to return 0;
Well, you had already put return 0 for the mute. (Yes you was missing one return 0 too)
Your code is correct but the order is incorrect. You send the message and after you check if the player is mute.
PHP код:
public OnPlayerText(playeridtext[])
{
    if(
connected[playerid] == true)
    {
        
SendClientMessage(playerid, -"{c3c3c3}» You can't talk, you need to spawn first...");
        return 
0;
    }
    
    if(
Mute[playerid] == 1// If the player is mute, we don't format the message and return 0
    
{
        
SendClientMessage(playerid, -1"{c3c3c3}(INFO) You're muted therefore you can't type anything.");
        return 
0;
    }
    
    
// Chat showing the id of the player
    
new pText[144];
    
format(pTextsizeof (pText), "{c3c3c3}[%d] {FFFFFF}%s"playeridtext);
    
SendPlayerMessageToAll(playeridpText);
    return 
0;

Reply


Messages In This Thread
OnPlayerText mute. - by ivndosos - 08.02.2018, 07:05
Re: OnPlayerText mute. - by aoky - 08.02.2018, 07:27
Re: OnPlayerText mute. - by ivndosos - 08.02.2018, 07:45
Re: OnPlayerText mute. - by ivndosos - 08.02.2018, 08:53
Re: OnPlayerText mute. - by Dayrion - 08.02.2018, 10:14

Forum Jump:


Users browsing this thread: 3 Guest(s)