???does anyone know how to set server password using cmd??
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);
}
}
Quote from: Anik on Oct 14, 2016, 11:15 AMHow can you set password without texts ?
SetPassword("");
How can I remove the password later?? If I use the cmd it will ask for text ... ?
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);
}
}
}
if you dont want password, try using /setpass none
Requirements: http://forum.vc-mp.org/?topic=738.msg4724#msg4724
Code: http://pastebin.com/Fk05vCag