function onEventStart ( res )
	outputChatBox ( "#FB00FF• Team Deathmatch #ffffffevent started. Type ''#FB00FF/join#ffffff'' #ffffffto join this event", getRootElement(), 255, 255, 255, true)
end
addEventHandler ( "onResourceStart", getRootElement(), onEventStart )
function changedimension ( source )
	if getElementDimension ( source ) == 1 then return outputChatBox ( "#FB00FF• You are already in the event", getRootElement(), 255, 255, 255, true);end		  
            setElementDimension ( source, 1 )            -- set his dimension to 1
			setElementPosition ( source, 260.8466796875, 1851.8400878906, 8.7578125 )
			outputChatBox ( "#FB00FF• You have been joined the event", getRootElement(), 255, 255, 255, true) 
	   return
    end 
addCommandHandler ( "join", changedimension )
function changedimension ( source )
            setElementDimension ( source, 0 )            -- set his dimension to 1
			setElementPosition ( source, 354.04452514648, 2532.6301269531, 16.720027923584 )
			outputChatBox ( "#FB00FF• You have been left the event", getRootElement(), 255, 255, 255, true)
			end
addCommandHandler ( "leave", changedimension )