Mute cmd problem

Started by KAKAN, Aug 01, 2015, 05:28 PM

Previous topic - Next topic

KAKAN

Everything is fine, but the thing "plr.IsMuted = (true or false)" isn't find
At that line (in mute and unmute) it shows "Member variable not found"
MUTE:-
else if ( cmd == "!mute" )
{
if ( level < 3 ) EchoNotice( user,"Error - Your level is not high enough to use that command." );
        else if ( !text ) EchoNotice( user,"Error - Syntax: " + cmd + " <Nick/ID> <Reason> ");
    else
{
            local plr = GetPlayer( GetTok( text, " ", 1 ) );
          if (!plr) EchoNotice( user, " Error - Unknown player" );
    else
    {
local msg = GetTok( text, " ", 2, NumTok( text, " " ) );
    if ( !msg ) EchoNotice( user, "Error - Invalid format." );
                else
{
local plr = GetPlayer( GetTok( text, " ", 1 ) ); msg = GetTok( text, " ", 2, NumTok( text, " " ) );
                    EchoMessage( "Muted Player:[ "  + plr.Name +  " ]. Reason:[ " + msg + " ]" );
Message( "Admin " + user + " has muted [ "  + plr.Name +  " ]. Reason: " + msg + "." );
                    plr.IsMuted = true;
                }
}
}
}


UNMUTE:-
else if ( cmd == "!unmute" )
    {
    if ( level < 3 ) EchoNotice( user,"Error - Your level is not high enough to use that command." );
    else if ( !text ) EchoNotice( user," Error - Syntax: !unmute <Nick/ID>" );
    else
        {
            local plr = GetPlayer( GetTok( text, " ", 1 ) );
          if (!plr) EchoNotice( user, " Error - Unknown Player" );
else
{
plr.IsMuted = false;
                EchoMessage( " Admin " + user + " has un-muted Player " + plr.Name + "." );
    Message( "Admin " + user + " has un-muted " + plr.Name + "." );
          }
}
}
oh no

Thijn

.IsMuted isn't in 0.4
Save whether the player is muted somewhere else, then return 0; on the onPlayerChat event.

MacTavish

class PlayerStats
{
IsMute = false;
}

status[plr.ID].IsMute = true; // use true/false toggle instead plr.IsMute

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

KAKAN

I already did it with the help of Mashreq, he told me to make array as .ismuted doesn't exist in 0.4, SO, its now solved
oh no