<commit_before>local objChinaGate = createObject(969, 2562.5, 1822, 10, 0, 0, 0)
exports.pool:allocateElement(objChinaGate)

local objChinaFence = createObject( 983, 2543.97, 1839.34, 10.5, 0, 0, 0)
exports.pool:allocateElement(objChinaFence)

open = false

-- Gate code
function useChinaGate(thePlayer)
	local team = getPlayerTeam(thePlayer)
	
	if (team==getTeamFromName("Yamaguch<NAME>")) then
		local x, y, z = getElementPosition(thePlayer)
		local distance = getDistanceBetweenPoints3D( x, y, z)

		if (distance<=10) and (open==false) then
			open = true
			outputChatBox("Yakuza gate is now Open!", thePlayer, 0, 255, 0)
			moveObject(objChinaGate, 3000, 2568, 1822, 10, 0, 0, 0)
			setTimer(closeChinaGate, 5000, 1, thePlayer)
		end
	end
end
addCommandHandler("gate", useChinaGate)

function closeChinaGate(thePlayer)
	if (getElementType(thePlayer)) then
		outputChatBox("Yakuza gate is now Closed!", thePlayer, 255, 0, 0)
	end<commit_msg>0000663: Yakuza gate does not open with the /gate command. <commit_after>local objChinaGate = createObject(969, 2562.5, 1822, 10, 0, 0, 0)
exports.pool:allocateElement(objChinaGate)

local objChinaFence = createObject( 983, 2543.97, 1839.34, 10.5, 0, 0, 0)
exports.pool:allocateElement(objChinaFence)

open = false

-- Gate code
function useChinaGate(thePlayer)
	local team = getPlayerTeam(thePlayer)
	
	if (team==getTeamFromName("Yamaguchi-Gumi")) then
		local x, y, z = getElementPosition(thePlayer)
		local distance = getDistanceBetweenPoints3D( x, y, z)

		if (distance<=10) and (open==false) then
			open = true
			outputChatBox("Yakuza gate is now Open!", thePlayer, 0, 255, 0)
			moveObject(objChinaGate, 3000, 2568, 1822, 10, 0, 0, 0)
			setTimer(closeChinaGate, 5000, 1, thePlayer)
		end
	end
end
addCommandHandler("gate", useChinaGate)

function closeChinaGate(thePlayer)
	if (getElementType(thePlayer)) then
		outputChatBox("Yakuza gate is now Closed!", thePlayer, 255, 0, 0)
	end
{'fraction_non_alphanumeric': 0.11776859504132231, 'fraction_numerical': 0.07902892561983471, 'mean_word_length': 5.543918918918919, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6196506', 'n_tokens_mistral': 858, 'n_tokens_neox': 677, 'n_words': 193}