<commit_before>local tyColSphere = createColSphere( 2242.52, -1170.7, 1029.79, 1)
exports.pool:allocateElement(tyColSphere)
setElementInterior( tyColSphere, 15 )
setElementDimension( tyColSphere, 1160 )

tyrese = createPed (28, 2264.65234375, -1134.3662109375, 1050.6328125)
exports.pool:allocateElement(tyrese)

setPedRotation(tyrese, 120)
setPedFrozen(tyrese, true)
setElementInterior( tyrese, 10 )
setElementDimension( tyrese, 1165 )
setElementData (tyrese, "activeConvo",  0) -- Set the convo state to 0 so people can start talking to him.
setElementData(tyrese, "name", "Ty")
setElementData(tyrese, "talk", true)
setElementData(tyrese, "rotation", getPedRotation(tyrese), false)

function startTy(thePlayer, hitDimension )
	triggerClientEvent( thePlayer, "startTy_c", getRootElement())
end
addEventHandler("onColShapeHit", tyColSphere, startTy )

function tyIntro () -- When player enters the colSphere create GUI with intro output to all local players as local chat.	
	-- Give the player the "Find Ty" achievement.
	exports.global:sendLocalMeAction(source,"knocks on the door")
	
	if(getElementData( tyrese, "activeConvo" )==1)then
		
		local pedX, pedY, pedZ = getElementPosition( source )
		local chatSphere = createColSphere( pedX, pedY, pedZ, 10 )
		exports.pool:allocateElement(chatSphere) -- Create the colSphere for chat output to local players
		local targetPlayers = getElementsWithinColShape( chatSphere, "player" )
		for i, player in ipairs( targetPlayers ) do
			outputChatBox("Ty shouts: Yo', I'm busy!", player, 255, 255, 255)
		end
		destroyElement(chatSphere)
		
		triggerClientEvent(source, "closeTyWindow", getRootElement())
	<commit_msg>Fixed Ty GUI appearing in all dimensions.<commit_after>local tyColSphere = createColSphere( 2242.52, -1170.7, 1029.79, 1)
exports.pool:allocateElement(tyColSphere)
tyColDim = 1160
setElementDimension( tyColSphere, tyColDim )

tyrese = createPed (28, 2264.65234375, -1134.3662109375, 1050.6328125)
exports.pool:allocateElement(tyrese)

setPedRotation(tyrese, 120)
setPedFrozen(tyrese, true)
setElementInterior( tyrese, 10 )
setElementDimension( tyrese, 1165 )
setElementData (tyrese, "activeConvo",  0) -- Set the convo state to 0 so people can start talking to him.
setElementData(tyrese, "name", "Ty")
setElementData(tyrese, "talk", true)
setElementData(tyrese, "rotation", getPedRotation(tyrese), false)

function startTy(thePlayer, matchingDimension )
	if matchingDimension then
		local logged = getElementData(thePlayer, "loggedin")
		
		if (logged==1) then
			if (isElementWithinColShape(thePlayer, tyColSphere)) then
				triggerClientEvent( thePlayer, "startTy_c", getRootElement())
			end
		end
	end
end
addEventHandler("onColShapeHit", tyColSphere, startTy )

function tyIntro () -- When player enters the colSphere create GUI with intro output to all local players as local chat.	
	-- Give the player the "Find Ty" achievement.
	exports.global:sendLocalMeAction(source,"knocks on the door")
	
	if(getElementData( tyrese, "activeConvo" )==1)then
		
		local pedX, pedY, pedZ = getElementPosition( source )
		local chatSphere = createColSphere( pedX, pedY, pedZ, 10 )
		exports.pool:allocateElement(chatSphere) -- Create the colSphere for chat output to local players
		local targetPlayers = getElementsWithinColShape( chatSphere, "player" )
		for i, player in ipairs( targetPlayers ) do
			outputChatBox("Ty shouts: Yo', I'm busy!", player, 255, 255, 255)
		end
		destroyElement(chatSphere)
		
		triggerClientEvent(source, "closeTyWindow", getRootElement())
	
{'fraction_non_alphanumeric': 0.10204081632653061, 'fraction_numerical': 0.04846938775510204, 'mean_word_length': 5.9060665362035225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5100009', 'n_tokens_mistral': 1344, 'n_tokens_neox': 1130, 'n_words': 326}