-- the player has to have a key or a keychain to open his own shared locked objects
if( name == meta:get_string("owner")) then
if( not( player:get_inventory():contains_item("main","locks:keychain 1"))
and not( player:get_inventory():contains_item("main","locks:key 1"))) then
minetest.chat_send_player( name, "You do not have a key or a keychain. Without that you can't use your shared locked objects!");
return false;
end
-- the player has to have a keychain to open shared locked objects of other players
else
-- the player has to have a key or a keychain to open his own shared locked objects
if( name == meta:get_string("owner")) then
-- if( not( player:get_inventory():contains_item("main","locks:keychain 1"))
-- and not( player:get_inventory():contains_item("main","locks:key 1"))) then
-- minetest.chat_send_player( name, "You do not have a key or a keychain. Without that you can't use your shared locked objects!");
-- return false;
-- end
return true;
-- the player has to have a keychain to open shared locked objects of other players
else
Users browsing this forum: No registered users and 17 guests