SetServer Password Using CMD

Started by Shovon^, Oct 14, 2016, 09:23 AM

Previous topic - Next topic

Shovon^

???does anyone know how to set server password using cmd??
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

Anik

Its too easy!
function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "setpass" )
     {
          if ( text ) SetPassword( text );
          else MessagePlayer("How can you set password without texts ??",player);
     }
}

vito


Shovon^

How can I remove the password later?? If I use the cmd it will ask for text ... ?
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

Mötley

IDK.. See what happens when you do this

function onPlayerCommand( player, cmd, text )
{
  if ( cmd == "setpass" )
  {
          if (!text)
          {
             Message("Open Lobby");
             SetPassword("");
             return true;
          }

          if (text)
          {
             Message("Locked Lobby");
             SetPassword(text);
          }
   }
}

Kewun

if you dont want password, try using /setpass none