lock a world

Started by MEGAMIND, Jul 19, 2018, 08:45 AM

Previous topic - Next topic

MEGAMIND

as the topic says can we lock a specific wolr and then open it our selves too?

!

Locked_Worlds -> [];

function onPlayerComand(player, cmd, args) {
if(cmd == "world") {
if(!IsNum(args)) return false;
if( Locked_Words.find( args.tointeger() ) != null ) return false;
player.World = args.tointeger()
}
else if( cmd == "lockworld" ) {
if(!IsNum(args)) return false;
if( Locked_Words.find( args.tointeger() ) != null ) return false;
Locked_Words.push( args.tointeger() );
}
else if( cmd == "unlockworld" ) {
if(!IsNum(args)) return false;
if( Locked_Words.find( args.tointeger() ) == null ) return false;
Locked_Words.remove( Locked_Words.find( args.tointeger() ) );
}
}

Discord: zeus#5155