Ignore or Unignore System

Started by Finch, Mar 15, 2015, 04:02 AM

Previous topic - Next topic

Finch

I have created a ignore and unignore system Its so simple

Add this on Commands.nut

   else if ( cmd == "ignore" )
{
if ( status[ player.ID ].IsReg == true )
{
if ( status[ player.ID ].IsLogged == true )
{
if ( text )
{
local plr = FindPlayer( text );
if(plr)
{
if(plr.ID==player.ID) ClientMessage( "You cannot ignore yourself.", player,255,255,0);
else if ( player.GetIgnoredBy( plr )) ClientMessage( "You're already ignoring that player.",player,255,255,0);
else
{
player.SetIgnoredBy( plr, true );
ClientMessage( "IGNORE: You're now ignoring " + plr.Name + ", you wont be able to see his/her messages.", player,255,255,0);
ClientMessage( "IGNORE: You're now being ignored by " + player.Name + ", he/she wont be able to see your messages.", plr,255,255,0);
ClientMessageToAll( "> " + player.Name + " is now ignoring " + plr.Name + ".",255,255,0);
}
}
else ClientMessage ( "Error - That player does not exist.",player,255,255,0);
}
   else ClientMessage ( "USAGE: /c ignore [ NICK/ID ]", player, 255,255,0);
   }
   else ClientMessage ( "Error - Please log-in to your account.", player, 255,255,0);
   }
   else ClientMessage ( "Error - Please register your account.", player,255,255,0);
   }

else if ( cmd == "unignore" )
{
if ( status[ player.ID ].IsReg == true )
{
if ( status[ player.ID ].IsLogged == true )
{
if ( text )
{
local plr = FindPlayer( text );
if(plr)
{
if ( player.GetIgnoredBy( plr ))
{
player.SetIgnoredBy( plr, false );
ClientMessage( "UN-IGNORE: You're no longer ignoring " + plr.Name + ", you are now able to see his/her messages.", player,255,255,0);
ClientMessageToAll( "> " + player.Name + " is no longer ignoring " + plr.Name + ".",255,255,0);
}
else ClientMessage( "You're currently not ignoring that player.",player,255,255,0);
}
else ClientMessage ( "Error - That player doesn't exist.",player,255,255,0);
}
else ClientMessage ( "USAGE: /c unignore [ NICK/ID ]",player,255,255,0);
}
else ClientMessage ( "Error - Please log-in to your account.", player, 255,255,0);
   }
   else ClientMessage ( "Error - Please register your account.", player,255,255,0);
   }





It was too simple maybe help u
Beztone is a scripter but he is too stupid

MacTavish

#1
Your code wont work because GetIgnoreBy and SetIgnoreBy is not exist in 0.4 atleast take a look on wiki before making any code

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

Retired VC:MP Player/Scripter :P

Finch

Beztone is a scripter but he is too stupid